-
Notifications
You must be signed in to change notification settings - Fork 30
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
Create a coding style guide #41
Comments
@jungshadow for readability I agree that following a consistent style is reasonable and if we are going to seek interoperability with 1622.2 it would be best to have consistent styles. |
Yes, a style guide makes it easier to maintain code/documents. |
@cjerdonek Knowing that @pstenbjorn uses a Windows machine to do most of his work and I'm on a Mac, I personally haven't experienced any issues. Are you encountering issues with the files? |
@jungshadow Yes, in that git is flagging any changed lines that don't end in a single newline |
Here is one of the better descriptions of the problem and solution:
|
I checked the line endings of the top-level files in the master branch, and this is what I found:
Also, |
@cjerdonek Sounds doable. I'll add a .gitattributes file to the vip5 branch and add a separate issue for that particular update. That said, since we'll have a .gitattributes file that enforces LF endings, I don't think it's worth mentioning it in the coding style guide. |
@jungshadow awesome, thanks! |
A few other conventions that I noticed would be useful for a style guide:
|
Can we add a section on attribute ordering in XSD? something like:
If this is deemed a good idea, I can refactor the current XSD when most of the pull requests have been merged. This will avoid merge conflicts. |
I collected the suggestions from this issue into StyleGuide.mdown on the branch feature/StyleGuide. @cjerdonek - The spaces vs tabs issue is still open, however to get going, I suggested 4 spaces to the tab. |
@demcg Great! Re: tabs vs spaces, yes, I think four spaces is more common. FWIW, all projects I have been involved with have preferred four spaces. I believe that is also git's default. Re: attributes, I would clarify that you mean attribute names as opposed to attribute values. Also, I think "snake_case" across the board makes more sense for attribute names (e.g. Can you make a PR for this? |
I'm wondering if we should follow the 1622.2 style guide. I mentioned this in a separate comment to @pstenbjorn a while back. If I were to break them out as a guess:
It would mean a lot of changes, but it would be nice to have an agreed-upon coding convention and a bit more similarity between the two specs, especially as we're planning to consume the ballot models. If everyone agrees, I'll create a pull request with the brief "style guide."
The text was updated successfully, but these errors were encountered: