Skip to content

Move guidelines around to make more coherent #149

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

Merged
merged 6 commits into from
Mar 3, 2021
Merged

Move guidelines around to make more coherent #149

merged 6 commits into from
Mar 3, 2021

Conversation

BenjaminMichaelis
Copy link
Member

Organize Guidelines.xml into order based off of section and subsection. Also, guidelines were difficult to find/read and get a complete picture of a topic without looking in multiple places(for example information about fields was in 3/4 different sections) and so after conversations with @MarkMichaelis thought to move things into the same sections where possible so you only have to look in one place for all the information about a topic. Miscellaneous might be able to be split up a bit more, and could be the next working piece.

For note, used these three powershell commands
- [xml] $Guidelines = Get-Content "RelativePath\CodingGuidelines\docs\Guidelines(8th Edition).xml"
- $Guidelines.SelectNodes("//Guidelines") | %{
>> $ParentNode = $_
>> $_.guideline | Sort-Object section, subsection | %{
>> $ParentNode.AppendChild($_) | out-null }}
- $Guidelines.Save("./SortedGuidelines.xml")
@BenjaminMichaelis BenjaminMichaelis added the documentation Improvements or additions to documentation label Feb 25, 2021
<guideline key="Ch23_e606562" severity="DO" section="Coding" subsection="Miscellaneous">DO use delegate types that match the signature of the desired method when an unmanaged API requires a function pointer.</guideline>
<guideline key="Ch23_d560942" severity="DO" section="Coding" subsection="Miscellaneous">DO use ref parameters rather than pointer types when possible.</guideline>
</Guidelines>
<guideline key="Ch03_2de296a" severity="CONSIDER" section="Coding" subsection="Arrays">CONSIDER checking the array length before indexing into an array rather than assuming the length.</guideline>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for re-ordering the items in the XML? The markdown generator doesn't care about the order of the XML items and with the order switched it makes it difficult to determine the actual changes in here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason was just so it was easy to combine topics for the md. With it all spread around it would of been extremely difficult assigning different sections to other subsections efficiently and accurately. Since I moved guidelines out of everything except coding section, this made sense to visualize what steps I was taking and which guidelines were going into which section. @Keboo

@Keboo Keboo merged commit c2318b1 into IntelliTect:master Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Guidelines difficult to read and gather all information quickly
3 participants