Skip to content
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

New MARK rule does not detect "//MARK: - sometext" #805

Closed
Sega-Zero opened this issue Sep 3, 2016 · 8 comments · Fixed by #888
Closed

New MARK rule does not detect "//MARK: - sometext" #805

Sega-Zero opened this issue Sep 3, 2016 · 8 comments · Fixed by #888

Comments

@Sega-Zero
Copy link
Contributor

Latest swiftlint doesn't detect //MARK: - mark text as a warning, but it should. Am i right?

@nikolay-dementiev
Copy link

Hello.

Why you think that the construction should be marked as warning?

@Sega-Zero
Copy link
Contributor Author

No space after //

@nikolay-dementiev
Copy link

.. I can't to find any apple's guidelines, in which says, that need space between "//" and "MARK:" ((

Have you some links to share?

@Sega-Zero
Copy link
Contributor Author

take a look at new MARK rule, please. #749

@nikolay-dementiev
Copy link

That's right. This issue has been resolved. And in repository it is already exists.

Please, try to update your SwiftLint on your device

For example, on my computer, it would be something like this command: "brew update && brew upgrade 'brew outdated'" in Terminal app (see there http://www.commandlinefu.com/commands/view/4831/update-all-packages-installed-via-homebrew)

@Sega-Zero
Copy link
Contributor Author

Ok, I'll be more specific:

~ $ swiftlint version
0.12.0
~ $ echo //MARK: mark text | swiftlint lint --use-stdin
<nopath>:1:2: warning: Mark Violation: MARK comment should be in valid format. (mark)
Done linting! Found 1 violation, 0 serious in 1 file.

$ echo // MARK: mark text | swiftlint lint --use-stdin
Done linting! Found 0 violations, 0 serious in 1 file.

$ echo //MARK: - mark text | swiftlint lint --use-stdin
Done linting! Found 0 violations, 0 serious in 1 file.

The last line should produce a warning

@nikolay-dementiev
Copy link

nikolay-dementiev commented Sep 6, 2016

Thank you for your patience in explaining the issue's reasons.

The latest version of SwiftLint, which is currently has stored in the repository, provided by your version of the code is described approximately by such rule: "

 nonTriggeringExamples: [
            "// MARK: good\n",
            "// MARK: - good\n",
            "// MARK: -\n"
        ]

  This variants of behavior is specifically described and located in the the exclusion.
ie .:
// MARK: - mark the text - this is good
// MARK: -mark the text - this is bad

jpsim added a commit that referenced this issue Nov 23, 2016
@jpsim
Copy link
Collaborator

jpsim commented Nov 23, 2016

Sorry it took a while to get to this. I've pushed a fix in #888.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants