-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
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")
<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> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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.