SwiftLint
SwiftLint copied to clipboard
Jazzy errors are not being detected in CI
New Issue Checklist
- [x] Updated SwiftLint to the latest version
- [x] I searched for existing GitHub issues
Describe the bug
A clear and concise description of what the bug is.
It looks like Jazzy warnings and errors are not being detected in CI. For example, https://dev.azure.com/jpsim/SwiftLint/_build/results?buildId=8942&view=logs&j=ca898bab-e9ac-5909-e869-07ade246060d&t=bdc59b0b-f79d-5892-08f4-c67ba9c29a9a
Examples which are in a sense separate issues, but I'm just recording it all here for right now.
The first issue I noticed (because I was wondering where the reporters documentation was) is:
WARNING: No documented top-level declarations match name "CSVReporter" specified in categories file
WARNING: No documented top-level declarations match name "CheckstyleReporter" specified in categories file
WARNING: No documented top-level declarations match name "CodeClimateReporter" specified in categories file
WARNING: No documented top-level declarations match name "EmojiReporter" specified in categories file
WARNING: No documented top-level declarations match name "GitHubActionsLoggingReporter" specified in categories file
WARNING: No documented top-level declarations match name "HTMLReporter" specified in categories file
WARNING: No documented top-level declarations match name "JSONReporter" specified in categories file
WARNING: No documented top-level declarations match name "JUnitReporter" specified in categories file
WARNING: No documented top-level declarations match name "MarkdownReporter" specified in categories file
I think the problem here is that the reporters are not public anymore since https://github.com/realm/SwiftLint/commit/5544ce1d476ccc366ffabe0612b21fd355ec93f6
Other warnings, which are not so obviously warnings:
Parsing ViolationsSyntaxVisitor.swift (108/108)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method init(fromAny:context:), instance method init(fromAny:context:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method asOption(), instance method asOption()
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method asDescription(with:), instance method asDescription(with:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method apply(_:ruleID:), instance method apply(_:ruleID:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method kind(from:), instance method kind(from:), instance method kind(from:), instance method kind(from:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method collectInfo(for:), instance method collectInfo(for:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method validate(file:collectedInfo:), instance method validate(file:collectedInfo:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method validate(file:), instance method validate(file:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method makeViolation(file:violation:), instance method makeViolation(file:violation:)
and
Parsing Glob.swift (39/108)
/Users/runner/work/1/s/Source/SwiftLintCore/Helpers/Glob.swift:8:8: error: no such module 'Glibc'
import Glibc
^
Parsing Glob.swift (39/108) /Users/runner/work/1/s/Source/SwiftLintCore/Helpers/Glob.swift:8:8: error: no such module 'Glibc' import Glibc ^
This one seems to be a bug in Jazzy or SourceKit(ten). They don't seem to evaluate compiler directives correctly. But this doesn't have an influence on the result in our case.
Not yet sure what causes the "Found conflicting type declarations ..." warnings. Do you have an idea?
Parsing Glob.swift (39/108) /Users/runner/work/1/s/Source/SwiftLintCore/Helpers/Glob.swift:8:8: error: no such module 'Glibc' import Glibc ^This one is a bug in Jazzy or SourceKit(ten). They don't seem to evaluate compiler directives correctly. But this doesn't have an influence on the result in our case.
Not yet sure what causes the "Found conflicting type declarations ..." warnings. Do you have an idea?
So I would have thought it means that Jazzy found public func asOption() -> OptionType and then public func asOption() -> SomeOtherType, but I can't see any actual examples like that in the code, so maybe it is a bug in Jazzy.
So I would have thought it means that Jazzy found
public func asOption() -> OptionTypeand thenpublic func asOption() -> SomeOtherType, but I can't see any actual examples like that in the code, so maybe it is a bug in Jazzy.
I've reported this in https://github.com/realm/jazzy/issues/1396. There are similar issues, but none that addresses the warning specifically. Let's see ...
For understanding, I've also just reported the Glibc one in https://github.com/realm/jazzy/issues/1397.