CFLint icon indicating copy to clipboard operation
CFLint copied to clipboard

Whitespace management

Open rsmolkin opened this issue 8 years ago • 4 comments

Are there any linter rules for managing white space? Like detecting tabs vs spaces, indentation issues, trailing spaces, etc.?

rsmolkin avatar Oct 30 '17 18:10 rsmolkin

@rsmolkin Good question. There are none at this time. Due to the way tokens are currently lexed/parsed whitespace is discarded, checking whitespace is possible but not easy within the current framework.

ryaneberly avatar Nov 01 '17 11:11 ryaneberly

I think this might be a potential useful addition for an unspecified future release - will reopen and track as enhancement.

In the meantime, @rsmolkin - I can recommend using http://editorconfig.org/ for helping you to manage tabs/spaces/indentation etc. across IDEs and across team members etc.

It's not quite the same as having linting rules, but it'll help with consistency.

TheRealAgentK avatar Dec 28 '17 20:12 TheRealAgentK

:+1: Consistency of tabs vs. spaces is the reason my team is investigating using a linter.

jaredbeck avatar Dec 19 '18 20:12 jaredbeck

I have added a very basic implementation of the tabs and the moment it enforces spaces over tabs, however I still need to merge with the latest version. I will creating a pull request by the end of next week as the moment I stuck on another project.

isaac-mercieca avatar Jan 05 '19 05:01 isaac-mercieca