[AMSDK-9723][CI] Adding CI task for SwiftLint#52
Merged
Conversation
…ocorrectable rules to trigger errors instead of warnings.
… lint source code
…h recent change in .swiftlint.yml
… 'swiftlint' call with multiple paths.
…gets to Makefile.
…Homebrew autoupdate in Makefile
…tLint autocorrect
nporter-adbe
approved these changes
Jul 20, 2020
Contributor
Author
|
@nporter-adbe After disabling Homebrew autoupdate (which would take several minutes) installing SwiftLint and running 'lint' added about 10 seconds to the build time. |
Contributor
|
@kevinlind would it be possible to consolidate the two files swfitlint.yml and swiftlint-ci.yml into one or do you want the errors to be triggered on CI only? |
Codecov Report
@@ Coverage Diff @@
## dev #52 +/- ##
=======================================
Coverage 78.08% 78.08%
=======================================
Files 29 29
Lines 981 981
=======================================
Hits 766 766
Misses 215 215 |
Contributor
|
@kevinlind added a small comment on this above. |
emdobrin
approved these changes
Aug 3, 2020
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds CircleCI steps to install SwiftLint from Homebrew and run SwiftLint 'lint' task.
Adds new config under
tools/format/.swiftlint-ci.ymlfor use by CI. This config sets all auto-correctable rules as errors if violated allowing CI job to fail.CircleCI configuration runs lint task only on
code/src/anddemo/AEPCommerceDemoApp.CircleCI job 158 shows a failing lint run since there was a formatting error in one of the files
CircleCI job 159 shows a passing lint run
Commit
c28b95fcontains files autocorrected by SwiftLint.Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: