ci: merge travis matrix, add salt-lint & rubocop to lint job#175
Conversation
2ae6519 to
7d77cd2
Compare
baby-gnu
left a comment
There was a problem hiding this comment.
Great, it was really painful to wait so long to see a lint problem.
Thanks.
7d77cd2 to
88fbddb
Compare
88fbddb to
9359bad
Compare
8055b60 to
36a8e31
Compare
* Runs the lint concurrently, for quicker feedback and time savings * Some of the restructuring inspired from: - https://github.com/travis-ci/travis-yml/blob/5ad02354de7d4fc3e9b9f71c44902058402d45ef/spec/fixtures/configs/co/coolo:open-build-service.yml
* Automated using myii/ssf-formula#60 * Initially mentioned on Slack (@dafyddj): - https://freenode.logbot.info/saltstack-formulas/20191004#c2723464 * Basis for the `git ls-files` invocation (@sblaisot): - https://freenode.logbot.info/saltstack-formulas/20191004#c2724272
* Automated using myii/ssf-formula#60
36a8e31 to
5f773d1
Compare
|
So an update: I've run this against every formula using the @n-rodriguez On a separate note, any feedback about the Ruby issue I asked above? |
|
Yes, that's better. Most are failing both but some are at least passing
Seems like most of the lint fixes are going to be for |
|
OK, using So there will be two types of
I can do that above using We should insist that @daks @baby-gnu @dafyddj @aboe76 Thanks for taking out time to review this. |
## [3.3.2](v3.3.1...v3.3.2) (2019-10-08) ### Bug Fixes * **rubocop:** add fixes using `rubocop --safe-auto-correct` ([484ce24](484ce24)) * **rubocop:** fix remaining errors manually ([9566b6f](9566b6f)) ### Code Refactoring * **travis:** merge `lint` stage into the `test` stage ([d3b93f8](d3b93f8)) ### Continuous Integration * **kitchen:** install required packages to bootstrapped `opensuse` [skip ci] ([1cfed60](1cfed60)) * **kitchen:** use bootstrapped `opensuse` images until `2019.2.2` [skip ci] ([0467bdf](0467bdf)) * **travis:** quote `${INSTANCE}` when running `kitchen verify` ([00d56a4](00d56a4)), closes [/github.com//pull/175#discussion_r332525964](https://github.com//github.com/saltstack-formulas/template-formula/pull/175/issues/discussion_r332525964) * **travis:** run `rubocop` during the `Lint` job ([8d8c766](8d8c766)) * **travis:** run `salt-lint` during the `Lint` job ([2df4646](2df4646)), closes [/freenode.logbot.info/saltstack-formulas/20191004#c2723464](https://github.com//freenode.logbot.info/saltstack-formulas/20191004/issues/c2723464) [/freenode.logbot.info/saltstack-formulas/20191004#c2724272](https://github.com//freenode.logbot.info/saltstack-formulas/20191004/issues/c2724272) * **travis:** use `env` and `name` for improved display in Travis ([5f773d1](5f773d1)), closes [/github.com//pull/175#discussion_r332613933](https://github.com//github.com/saltstack-formulas/template-formula/pull/175/issues/discussion_r332613933) ### Documentation * **bug_report:** add section requesting commit hash / release tag ([faccb6a](faccb6a)) * **bug_report:** group into sections for better logical ordering ([e9b6c2f](e9b6c2f)) * **contributing:** add recent `semantic-release` formula ([c2924b0](c2924b0)) * **contributing:** add recent `semantic-release` formula ([8d2318c](8d2318c)) * **contributing:** add recent `semantic-release` formula [skip ci] ([85118de](85118de)) * **issues:** provide `Bug report` & `Feature request` templates ([f90f1f6](f90f1f6)) * **issues:** use `Meta` instead of `Optional` as suggested ([65cadb4](65cadb4)), closes [/github.com//pull/174#issuecomment-538999459](https://github.com//github.com/saltstack-formulas/template-formula/pull/174/issues/issuecomment-538999459) * **issues:** use larger headings (from level 4 to level 3) ([53e7b75](53e7b75)) * **pillar.example:** fix TOFS comment to explain the default path [skip ci] ([fde5063](fde5063)), closes [/github.com/saltstack-formulas/libvirt-formula/pull/60#issuecomment-537965254](https://github.com//github.com/saltstack-formulas/libvirt-formula/pull/60/issues/issuecomment-537965254) [/github.com/saltstack-formulas/libvirt-formula/pull/60#issuecomment-537988138](https://github.com//github.com/saltstack-formulas/libvirt-formula/pull/60/issues/issuecomment-537988138) * **pillar.example:** improve TOFS comment to explain the default path [skip ci] ([27d2fe4](27d2fe4)), closes [/github.com/saltstack-formulas/nginx-formula/blob/17291a0ae2c2554707b79d897bb6ddec716e8426/pillar.example#L340-L341](https://github.com//github.com/saltstack-formulas/nginx-formula/blob/17291a0ae2c2554707b79d897bb6ddec716e8426/pillar.example/issues/L340-L341)
|
🎉 This PR is included in version 3.3.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sorry for the late answer : usually I conform to https://github.com/rubocop-hq/ruby-style-guide#method-invocation-parens and https://github.com/rubocop-hq/ruby-style-guide#method-invocation-parens-internal-dsl and generally speaking to the whole guide itself. Between : describe file('/etc/postgresql/9.1/main/pg_hba.conf') do
its('content') { should match(%r{local\s.*?all\s.*?all\s.*?md5}) }
its('content') { should match(%r{host\s.*?all\s.*?all\s.*?127.0.0.1\/32\s.*?md5}) }
its('content') { should match(%r{host\s.*?all\s.*?all\s.*?::1\/128\s.*?md5}) }
end
VS
describe file('/etc/postgresql/9.1/main/pg_hba.conf') do
its('content') { should match %r{local\s.*?all\s.*?all\s.*?md5} }
its('content') { should match %r{host\s.*?all\s.*?all\s.*?127.0.0.1\/32\s.*?md5} }
its('content') { should match %r{host\s.*?all\s.*?all\s.*?::1\/128\s.*?md5} }
endI prefer the second version. |
|
@n-rodriguez Thanks for the confirmation, that's what I went with in the end. |
# [1.18.0](v1.17.1...v1.18.0) (2019-10-10) ### Bug Fixes * **bin/kitchen:** fix `rubocop` errors ([](58881a7)) * **gemfile:** fix `rubocop` errors ([](e0ec88a)) * **salt-lint:** fix errors ([](5890b8a)) ### Code Refactoring * **defaults:** use node anchors for common `line_length` values ([](ac9b7a5)) ### Continuous Integration * merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](2dac9b0)) ### Features * **rubocop:** add per-formula overrides ([](212edf0)) * **rubocop:** include for this repo ([](f4fc3c1)) * **salt-lint:** add per-formula overrides (via. TOFS) ([](9ec9b1e)) * **salt-lint:** include for this repo ([](1d9636e)) * **travis:** update for new structure of merging the `lint` stage ([](dbee3f7)) * **travis:** use `env` and `name` for improved display in Travis ([](8d86eb4)), closes [/github.com/saltstack-formulas/template-formula/pull/175#discussion_r332613933](https://github.com//github.com/saltstack-formulas/template-formula/pull/175/issues/discussion_r332613933) * **travis:** use conditional to provide one or two lint jobs ([](5c2f134)) * **ufw:** add specific `pip3` customisations to `.travis.yml` ([](c3acbd1))
|
@dafyddj @n-rodriguez Interesting note about the parentheses. In the case with Which probably explains why the InSpec documentation had them in that example. |
salt-lint&rubocoptolintjob myii/ssf-formula#60Essentially, this PR is quite simple:
lintstage into a job that is run concurrently with the rest of the matrix.salt-lintto thelintjob.rubocopto thelintjob.The details are easier to explain commit-by-commit.
refactor(travis): merge
lintstage into theteststagelintstage into theteststage matrix.lintstage, there were ideas to run it first, to get the quickest feedback to PR authors and maintainers.ci(travis): run
salt-lintduring theLintjobgit ls-filesinvocation:ci(travis): run
rubocopduring theLintjobfix(rubocop): add fixes using
rubocop --safe-auto-correctrubocop.fix(rubocop): fix remaining errors manually