Skip to content

[AMSDK-9723][CI] Adding CI task for SwiftLint#52

Merged
kevinlind merged 11 commits intoadobe:devfrom
kevinlind:amsdk-9723-ci
Aug 3, 2020
Merged

[AMSDK-9723][CI] Adding CI task for SwiftLint#52
kevinlind merged 11 commits intoadobe:devfrom
kevinlind:amsdk-9723-ci

Conversation

@kevinlind
Copy link
Copy Markdown
Contributor

@kevinlind kevinlind commented Jul 18, 2020

Description

Adds CircleCI steps to install SwiftLint from Homebrew and run SwiftLint 'lint' task.

  • Adds new config under tools/format/.swiftlint-ci.yml for 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/ and demo/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 c28b95f contains files autocorrected by SwiftLint.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@kevinlind kevinlind changed the title [DO NOT MERGE] [AMSDK-9723][CI] Adding CI task for SwiftLint [AMSDK-9723][CI] Adding CI task for SwiftLint Jul 18, 2020
Copy link
Copy Markdown
Contributor

@nporter-adbe nporter-adbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loos good. how much time does installing swift lint add to our builds?

@kevinlind
Copy link
Copy Markdown
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.

@emdobrin
Copy link
Copy Markdown
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
Copy link
Copy Markdown

codecov bot commented Jul 20, 2020

Codecov Report

Merging #52 into dev will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev      #52   +/-   ##
=======================================
  Coverage   78.08%   78.08%           
=======================================
  Files          29       29           
  Lines         981      981           
=======================================
  Hits          766      766           
  Misses        215      215           

@emdobrin
Copy link
Copy Markdown
Contributor

@kevinlind added a small comment on this above.

@kevinlind kevinlind merged commit e544bb6 into adobe:dev Aug 3, 2020
@kevinlind kevinlind deleted the amsdk-9723-ci branch August 3, 2020 18:20
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 this pull request may close these issues.

3 participants