Repository navigation
Introduce linting #373
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
Merged
alexanderdibenedetto
merged 3 commits into
adb/issue-236-ready-spki-straight-from-certificate-der-encoding-and-hash-as-is
from
adb/introduce-linting
Oct 23, 2026
Merged
Introduce linting #373
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| --- | ||
| BasedOnStyle: WebKit | ||
| AlignAfterOpenBracket: BlockIndent | ||
| AlignConsecutiveAssignments: false | ||
| AlignConsecutiveDeclarations: false | ||
| AlignConsecutiveMacros: true | ||
| AlignEscapedNewlines: Left | ||
| AllowAllArgumentsOnNextLine: true | ||
| AllowAllParametersOfDeclarationOnNextLine: false | ||
| AllowShortBlocksOnASingleLine: false | ||
| AllowShortCaseLabelsOnASingleLine: true | ||
| AllowShortFunctionsOnASingleLine: Empty | ||
| AlwaysBreakBeforeMultilineStrings: true | ||
| BinPackArguments: false | ||
| BreakBeforeBraces: Attach | ||
| BreakBeforeTernaryOperators: true | ||
| ColumnLimit: 180 | ||
| Cpp11BracedListStyle: false | ||
| IncludeBlocks: Preserve | ||
| IndentWidth: 4 | ||
| InsertBraces: true | ||
| KeepEmptyLinesAtTheStartOfBlocks: true | ||
| NamespaceIndentation: None | ||
| ObjCBinPackProtocolList: Never | ||
| ObjCBlockIndentWidth: 4 | ||
| ObjCSpaceAfterProperty: true | ||
| PointerAlignment: Right | ||
| ReflowComments: true | ||
| SortIncludes: true | ||
| SpaceBeforeAssignmentOperators: true | ||
| SpaceBeforeCpp11BracedList: true | ||
| SpaceBeforeCtorInitializerColon: true | ||
| SpaceBeforeParens: ControlStatements | ||
| SpaceBeforeRangeBasedForLoopColon: true | ||
| SpaceInEmptyParentheses: false | ||
| SpacesInContainerLiterals: false | ||
| UseTab: Never | ||
|
|
||
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| { | ||
| "fileScopedDeclarationPrivacy" : { | ||
| "accessLevel" : "private" | ||
| }, | ||
| "indentConditionalCompilationBlocks" : true, | ||
| "indentSwitchCaseLabels" : false, | ||
| "indentation" : { | ||
| "spaces" : 4 | ||
| }, | ||
| "lineBreakAroundMultilineExpressionChainComponents" : true, | ||
| "lineBreakBeforeControlFlowKeywords" : false, | ||
| "lineBreakBeforeEachArgument" : true, | ||
| "lineBreakBeforeEachGenericRequirement" : true, | ||
| "lineBreakBetweenDeclarationAttributes" : false, | ||
| "lineLength" : 120, | ||
| "maximumBlankLines" : 1, | ||
| "multiElementCollectionTrailingCommas" : false, | ||
| "noAssignmentInExpressions" : { | ||
| "allowedFunctions" : [ | ||
| "XCTAssertNoThrow" | ||
| ] | ||
| }, | ||
| "prioritizeKeepingFunctionOutputTogether" : false, | ||
| "reflowMultilineStringLiterals" : "never", | ||
| "respectsExistingLineBreaks" : true, | ||
| "rules" : { | ||
| "AllPublicDeclarationsHaveDocumentation" : false, | ||
| "AlwaysUseLiteralForEmptyCollectionInit" : false, | ||
| "AlwaysUseLowerCamelCase" : false, | ||
| "AmbiguousTrailingClosureOverload" : false, | ||
| "AvoidRetroactiveConformances" : true, | ||
| "BeginDocumentationCommentWithOneLineSummary" : false, | ||
| "DoNotUseSemicolons" : true, | ||
| "DontRepeatTypeInStaticProperties" : true, | ||
| "FileScopedDeclarationPrivacy" : true, | ||
| "FullyIndirectEnum" : true, | ||
| "GroupNumericLiterals" : true, | ||
| "IdentifiersMustBeASCII" : true, | ||
| "NeverForceUnwrap" : false, | ||
| "NeverUseForceTry" : true, | ||
| "NeverUseImplicitlyUnwrappedOptionals" : false, | ||
| "NoAccessLevelOnExtensionDeclaration" : false, | ||
| "NoAssignmentInExpressions" : true, | ||
| "NoBlockComments" : true, | ||
| "NoCasesWithOnlyFallthrough" : true, | ||
| "NoEmptyLinesOpeningClosingBraces" : false, | ||
| "NoEmptyTrailingClosureParentheses" : true, | ||
| "NoLabelsInCasePatterns" : true, | ||
| "NoLeadingUnderscores" : false, | ||
| "NoParensAroundConditions" : true, | ||
| "NoPlaygroundLiterals" : true, | ||
| "NoVoidReturnOnFunctionSignature" : true, | ||
| "OmitExplicitReturns" : true, | ||
| "OneCasePerLine" : true, | ||
| "OneVariableDeclarationPerLine" : true, | ||
| "OnlyOneTrailingClosureArgument" : true, | ||
| "OrderedImports" : true, | ||
| "ReplaceForEachWithForLoop" : true, | ||
| "ReturnVoidInsteadOfEmptyTuple" : true, | ||
| "TypeNamesShouldBeCapitalized" : true, | ||
| "UseEarlyExits" : true, | ||
| "UseExplicitNilCheckInConditions" : true, | ||
| "UseLetInEveryBoundCaseVariable" : true, | ||
| "UseShorthandTypeNames" : true, | ||
| "UseSingleLinePropertyGetter" : true, | ||
| "UseSynthesizedInitializer" : true, | ||
| "UseTripleSlashForDocumentationComments" : true, | ||
| "UseWhereClausesInForLoops" : true, | ||
| "ValidateDocumentationComments" : false | ||
| }, | ||
| "spacesAroundRangeFormationOperators" : false, | ||
| "spacesBeforeEndOfLineComments" : 2, | ||
| "tabWidth" : 4, | ||
| "version" : 1 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| disabled_rules: | ||
| - line_length | ||
| - file_length | ||
| - inclusive_language | ||
| - large_tuple | ||
| - function_body_length | ||
| - type_body_length | ||
| - trailing_whitespace # Let swift-format handle whitespace | ||
| - vertical_whitespace # Let swift-format handle line breaks | ||
| - opening_brace # Let swift-format handle brace placement | ||
| - closure_parameter_position # Let swift-format handle closure parameter position | ||
|
|
||
| opt_in_rules: | ||
| - private_over_fileprivate | ||
|
|
||
| excluded: | ||
| - output | ||
| - .build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🟡 (optional) Every CI run can go red with no code change once Homebrew ships a newer clang-format or SwiftLint, and that also skips all test jobs. The lint job runs
brew install swiftlint clang-formatwith no version pin, whilescripts/lint.sh --checkfails on any formatting diff or strict-mode warning. Fix: pin both tools to the versions used for the reformat, e.g. aclang-format@<major>formula or a fixed SwiftLint release binary, and print their versions in the job log. Since test, demo, xcframework and swift-package all haveneeds: lint, one drift blocks the whole pipeline.Why this was flagged
The lint job at .github/workflows/ci.yml:26 runs
brew install swiftlint clang-format, which installs whatever version Homebrew currently has. scripts/lint.sh:30 runsclang-format --dry-run --Werrorand scripts/lint.sh:29 runsswiftlint lint --strict, so the job fails on any output difference or new warning. clang-format output changes between LLVM major releases under the same .clang-format (WebKit base, InsertBraces, AlignAfterOpenBracket: BlockIndent). New SwiftLint releases add default-on rules, and--strictturns their warnings into errors. When Homebrew bumps either formula, lint fails on an unchanged tree. Because the test, demo, xcframework and swift-package jobs now haveneeds: lint, they are all skipped. On the base branch there is no lint job and these jobs run on every push. The only tool tied to the pinned DEVELOPER_DIR Xcode isxcrun swift format; the brew tools have no such pin.Verification: The new lint job runs
- run: brew install swiftlint clang-formatwith no version pin. That step is at .github/workflows/ci.yml line 25. scripts/lint.sh, which this diff adds, then fails on any difference. The diff also addsneeds: lintto test, demo, xcframework and swift-package, so a lint failure caused only by a tool update skips all test and build jobs.