-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Do generated files have to follow the current coding style? #8310
Comments
No, generated files are exempt. We'd prefer to follow the coding style, but we do not enforce it, and we aren't prioritizing updating the existing files. I started updating the existing files, but I paused that when I realized that there's one point that's hard to resolve: the code style enforces a maximum line length, whereas in some files it's very annoying to enforce a maximum line length. For example, in |
Thanks for clarification. |
A major reason why we have a coding style is that we want to avoid noise in the form of changes where someone just restyled some code without changing its semantics (often because their editor did it automatically). This led us towards having a strict style. Furthermore, the easiest way we found to enforce the style is to canonicalize the code and reject any difference, which unfortunately forces us to be more strict than we'd like. But after about 9 months I think the new coding style has been a markedly net positive. |
Speaking about noise, the files were made |
@gilles-peskine-arm, while on the subject of enforcing code style. |
If we process the generated files, the end result is sensitive to whether you do (1. update generated files; 2. fix code style) or (1. fix code style; 2. update generated files). We picked a way that has less hassle: #6820 To be clear, having generated files that conform to the code style is something we want, ideally. It's just lower priority than many, many other things we want. |
You know the problem and working on it; Hopefully some day thing will get better. |
mbedtls/scripts/generate_errors.pl
Lines 207 to 208 in 644fd34
This creates statements in the previous style
return( "_message ..._" );
while the current style implies
return "_message ..._";
The text was updated successfully, but these errors were encountered: