Skip to main content

Derived from the popular CPPLint from Google, but modified to incorporate code styles by Dr. B.S. Sanjeev for my undergraduate Data Structures and Algorithms courses

Project description

BSSlint

Derived from the popular CPPLint from Google, but modified to incorporate code styles by Dr. B.S. Sanjeev for my undergraduate Data Structures and Algorithms courses.

We’ve all written terrible code, and using proper indentation and code styling is the first step one has to take to improve the quality of code. Linter is a helper, that helps in identifying common style related errors in code.

The style guidelines this tries to follow are based on Google’s Style Guide, however they have since then been modified to incorporate the styles suggest for my course.

Every problem is given a confidence score from 1-5, with 5 meaning the certainty of the problem, and 1 meaning it could be a legitimate construct. This will miss some errors, and is not a substitute for a code review.

Installation

Method 2 (Do It Yourself)

The script can also be directly used by downloading the binary into the folder of execution by running the command :

wget -O bsslint http://git.io/vuUVj && chmod +x bsslint Once the executable file is in the desired folder, any code can be evaluated using :

./bsslint [FILENAME]

Usage

If you have installed bsslint globally, and if it is available in your $PATH, a simple command can be used :

bsslint [FILENAME]

Another cool way of using bsslint is to use add the following mapping in vimrc to add a key (like F8), to run the lint when desired :

autocmd filetype cpp nnoremap<F8> :!bsslint % <CR> autocmd filetype c nnoremap<F8> :!bsslint % <CR> For similar tools to compile and evaluate results like IDE from within vim, check out my vimrc and other dotfiles.

Full Disclaimer

This is a very old code, that I had lost, and then recovered one day. It is not perfect, however it was extremely helpful to me during the evaluations. I have tried cleaning it up a little.

Contributions are welcome.

Known Errors

All variables used in any function are to be declared at the start of the same. This file does not detect this requirement.

License

MIT

Project details


Release history Release notifications | RSS feed

This version

0.5

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

BSSLint-0.5.tar.gz (67.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page