Sourcecode styling
Hi,
A while ago I found your tool. Most of it works really great. But during the testing period I noticed a few styling issues that I cannot resolve within a custom layout file or a quick change in the source code.
Our development team is using Stylecop (http://code.msdn.microsoft.com/sourceanalysis) to enforce a uniform styling of the code. One of the rules enforces the usage of spaces instead of tabs to indent the code.This option is not configurable in a custom layout, but looking at the soucecode it is quite easy to add this functionality. For testing purposes I have already added a hardcoded replace to the GetTabString(int tabAmount), but getting it in a configuration options will result in changing more code files which will make it a lot harder to stay up to date with bugfixes. It would be nice to see a configuration option to set a number of spaces which can be used to replace the default tabs in the official releases.
The other styling issues which I noticed that could not be resolved with a custom layout file are the following:
Nested Classes:
When a class contains one or more nested classes, the separating lines are not added in an expected way.
- After the region name there are 2 separating lines instead of the expected 1.
- At the end of the region there is no separating line between the end of the nested class and the endregion tag.
Nested structs:
- It is not possible to recognize nested structs and put them in the same region as nested classes.
- When using nested structs the separating lines between the structs (and between the struct and a custom region) are removed.
- The number of separating lines between rgionated regions and custom regions or unrecognized code contains to many lines.
Enums:
- In the regionate settings file a region is defined for enumerations, After each region the indentation whitespace is removed for the next statement, which (in our case) contains the "<summary>" tag in the comment lines.
As an attachment I have included the layout file used, some classes to reproduce the styling issues and a copy of the stylecop settings we are using.
Is there a way to fix these issues?
Thanks in advance,
Barry
A while ago I found your tool. Most of it works really great. But during the testing period I noticed a few styling issues that I cannot resolve within a custom layout file or a quick change in the source code.
Our development team is using Stylecop (http://code.msdn.microsoft.com/sourceanalysis) to enforce a uniform styling of the code. One of the rules enforces the usage of spaces instead of tabs to indent the code.This option is not configurable in a custom layout, but looking at the soucecode it is quite easy to add this functionality. For testing purposes I have already added a hardcoded replace to the GetTabString(int tabAmount), but getting it in a configuration options will result in changing more code files which will make it a lot harder to stay up to date with bugfixes. It would be nice to see a configuration option to set a number of spaces which can be used to replace the default tabs in the official releases.
The other styling issues which I noticed that could not be resolved with a custom layout file are the following:
Nested Classes:
When a class contains one or more nested classes, the separating lines are not added in an expected way.
- After the region name there are 2 separating lines instead of the expected 1.
- At the end of the region there is no separating line between the end of the nested class and the endregion tag.
Nested structs:
- It is not possible to recognize nested structs and put them in the same region as nested classes.
- When using nested structs the separating lines between the structs (and between the struct and a custom region) are removed.
- The number of separating lines between rgionated regions and custom regions or unrecognized code contains to many lines.
Enums:
- In the regionate settings file a region is defined for enumerations, After each region the indentation whitespace is removed for the next statement, which (in our case) contains the "<summary>" tag in the comment lines.
As an attachment I have included the layout file used, some classes to reproduce the styling issues and a copy of the stylecop settings we are using.
Is there a way to fix these issues?
Thanks in advance,
Barry