willwolfram18 / 183lint Goto Github PK
View Code? Open in Web Editor NEWA Python program designed to read C++ files for basic style using the Python bindings to Clang
A Python program designed to read C++ files for basic style using the Python bindings to Clang
Here is the source line:
cout << "Choice is: " << choice << endl;
And the error message:
Line 122, Column 31: Incorrect spacing around < operator.
code:
if (!cin || !isValidDate(month, day, year)) {
But
if (! cin || ! isValidDate(month, day, year)) { //gives
Line 320, Column 9: Incorrect spacing around ! operator.
Line 320, Column 18: Incorrect spacing around the unary ! operator.
Any time I have an assert statement, it's being flagged as using a ternary operator.
For instance:
assert(!inSortedVector(nums, 5));
Gets me this feedback:
Line 25, Column 5: EECS 183 advises against the use of the ternary operator (e.g. int x = foo() ? 1 : 2).
I had the line of code
int num_batches = ceil(static_cast<double>(num_people)/PER_BATCH);
and I received the feedback
Line 46, Column 39: Incorrect spacing around < operator.
When submitting a file with this line of code:
return x >= -9 && x <= 9;
I received the message "Incorrect spacing around - operator."
Complaints have been made, stating it isn't clear which files are correct and which ones have errors. One design idea is grouping incorrect files in box, which can be further broken into individual files
Does not catch spacing errors on operators that are overloaded by classes. Example code that can create the bug:
string s = "Hello";
s = s+"goodbye";
// as well as
if (!cin || true)
{
}
Issue discovered by Professor Dorf in ticket #3
For the following code, it results in a style error:
} else if (slash1 != '/' || slash2 != '/' ||
Error message:
Incorrect spacing around / operator.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.