New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style suggestions cannot be disable #2984
Comments
I am sorry we didn't add the option to turn it off yet. This is a nice first issue for somebody to fix, just a compile time option needs to be added, and the warnings should only be emitted when the option is on. Regarding default options, that's a separate discussion. But at the very least we also need to add an option |
Any progress on this? Style warnings are being produced for |
@gxyd, @HarshitaKalani, @parth121101 does anyone of you have time to fix this? It should be pretty simple, just a new compiler option to add. The |
Can we use $ lfortran a.f90
style suggestion: Use 'end do' instead of 'enddo'
--> a.f90:5:5
|
5 | enddo
| ^^^^^ help: write this as 'end do'
style suggestion: Use 'end if' instead of 'endif'
--> a.f90:8:5
|
8 | endif
| ^^^^^ help: write this as 'end if'
Note: Please report unclear, confusing or incorrect messages as bugs at
https://github.com/lfortran/lfortran/issues.
i is 10
$ lfortran a.f90 --no-warnings
i is 10 |
That will disable all warnings, including possibly valid warnings. For example,
Recommendations for a change in style is based on someone's personal opinion. That opinion may conflict with a user's opinion and, more importantly, a style guide that one must follow. There is no compelling reason to issue style recommendations without a user specifically asking for them with, say, |
Got it. Thanks @kargl . Will work on it. |
It seems that there is no option to disable style suggestions. Please add a --no-style option!
These suggestions vastly swamp actually errors with lfortran.
Edited: In fact, style suggestions should not be the default. The option should be --enable-style.
Edited**2: Just realized that the style suggestion was completely and utterly wrong. It seems to be complaining about the C preprocessor directive "#endif". Whoops.
The text was updated successfully, but these errors were encountered: