ronanboiteau / normez Goto Github PK
View Code? Open in Web Editor NEWCoding-style checker for Epitech students. This program analyzes your C source files for Epitech coding-style violations.
License: MIT License
Coding-style checker for Epitech students. This program analyzes your C source files for Epitech coding-style violations.
License: MIT License
Hello,
When i make nb++ for example, but NormEZ tells me that I have misplaced space(s) around '++' sign, but only there aren't misplaced space(s) around this with this code as for example:
if (test_neg1 == 1) {
my_putchar('-');
nb1++;
nb2++;
}
And in Makefile, there are tabulation, but NormEZ wait for spaces
Forbidden functions are not part of the coding style but are per-project and thus cannot be detected should not be detected in a general checker.
NormEZ did not warn about the length of this function, very sad
int my_getnbr(char *str)
{
int negative_multiplier;
unsigned long long int storage;
negative_multiplier = 1;
storage = 0;
while (*str && *str != '\0' && (*str == '+' || *str == '-')){
if (*str == '-') negative_multiplier *= -1;
str++;
}
while (*str && *str != '\0' && (*str >= '0' && *str <= '9')){
if (storage > 214748364){
return 0;
}
storage = storage*10 + *str-48;
str++;
}
if (negative_multiplier == -1 && storage > 2147483648){
return 0;
} else if (negative_multiplier == 1 && storage > 2147483647){
return 0;
}
storage *= negative_multiplier;
return (storage);
}
Actually missplaced curly brackets are not detected.
According to the L4 rule :
"Opening curly brackets should be at the end of their line, except for functions where they must be placed alone on their line."
in this test case :
int main(void) {
----if (1)
----{
--------return (1);
----}
----return (0);
}
missplaced curly bracket are not detected for the function AND the if statement.
Cheers,
Salut
ร quand la version pour la nouvelle norme c++?
ca pourrait interresser beaucoup de 2nde annee ^^
Merci!
https://user-images.githubusercontent.com/72006230/101776704-5a1dd080-3abf-11eb-9a8c-ff847d8572bc.png
Il indique un erreur lorsque l'on fait variable++; alors que cela n'en est pas une :p
Hi, with this kind of code:
my_putchar('|');
I get this error:
Misplaced space(s) around '|' sign.
You should consider avoid this warning when there are quotes around the pipe. :)
Hello, i've figured out four small problems in your Norme.
First of, when -- (Or ++, or ^ ...) is surrended by other chars (in a commentary ofc), your Norme detect it as an error.
The second that I'm running in, is the use of this sentence
var[0]++;
In third position, the printf function, while being detected as an error, enclose also the my_printf function which is also declared as an error, as every other line containing the word printf inside, commented or not.
Which, while being correct, is detcted as an error.
Finally, the last error that happens to me is the several assignements on the same line that happens with :
write(2, ": \033[1;36m", 9);
What is misplaced comment error ?
I don't see anything like that in the coding style.
If the '=' is in a string it should not be detected as a coding style error.
NormEZ.rb:293:in 'block in check_trailing_spaces_tabs': invalid byte sequence in UTF-8 (ArgumentError)
from NormEZ.rb:292:in 'each_line'
from NormEZ.rb:292:in 'check_trailing_spaces_tabs'
from NormEZ.rb:126:in 'check_file'
from NormEZ.rb:122:in 'initialize'
from NormEZ.rb:542:in 'new'
from NormEZ.rb:542:in '<main>'
What is it?
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.