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
Fix ts
etc overrides in files
#196
Comments
Agree. The question is: should the source files then be re-indented at the same time? If we just remove the modeline from each file then as changes are made to them we end up with inconsistent coding styles within one file which is IMHO worse than the wrong coding style used consistently in one file. Perhaps as people make changes they should be encouraged to fix files as they are modified? Then after a few months when development has calmed down we can do a final modeline purge + re-indent when it's more convenient to give everyone whitespace merge conflicts :). |
Isn't the indentation 2 across all files? And someone said he/she is going to make an uncrustify config for the coding style and run it. This should fix inconsitencies. |
If there's a big uncrustify run then that's the point to strip the modelines out IMHO. |
that's = what's? |
No, "that's" == "that is". As in "when X happens, that is the correct point at which to do Y." |
So "remove the modelines in the same commit as uncrustify is run". In that case I agree :) |
Yup. Or, preferably, the same PR but different commits. |
What replacement do you propose if modelines are going to be removed? |
The best would probably be to just replace them with the current style
|
I don't see how the (currently non-existent) style guide comes into play here. If anything, the modeline has to follow the style guide. |
A C++ style guide that contains many things that are irrelevant or even incorrect for a C project. Before this can be the style guide of neovim it has to be carefully analyzed, the incorrect things have to be removed, and things only relevant to C but not C++ have to be added. You should not rush changes based on the current state of that guide. Either way, if the style guide doesn't allow modelines, then the style guide has to be changed or a proper replacement for modelines has to be found. At this point, since the modelines are already in use and the style guide is not, I don't see why the guide shouldn't adapt to the needs of the project. |
I never used modelines, so I can't comment on this. For enforcing project-specific code style, I use local vimrc by @MarcWeber. |
The problem is that all the modelines state values that forces us to use
|
That seems to be consistent with the Google style guide. The concrete values should, of course, be adapted to the style guide. |
@mahkoh While the Google C++ style guide is a C++ style guide, C++ is still a superset of C. We addressed the C-specific details that the Google style guide lacking in #66 and #104, which is why we added the modifications. If there are additional C-specific details that are ambiguous in the style guide, we will add those as well, but as of now, there are no obvious holes in our coding convention. We also have a lint tool, which is included in PR #192, as well as an uncrustify config that will be used for an initial clean-up. That said, the coding convention specifies 2 spaces for indentation, and the indentation settings, whether we use a modeline or not, should be:
|
C++ is not a superset of C. The following things come to mind:
|
@mahkoh I don't want to argue with you, but the man says C is a super-set of C++. |
He says that C++ is a super-set of ANSI C which means C89. (And even that is not quite true as he explains.) |
This has been noted deep inside a previous ticket..
Every file begins with
/* vi:set ts=8 sts=4 sw=4:
This doesn't work well with the style guide. These must be fixed or removed.
The text was updated successfully, but these errors were encountered: