Skip to content
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

Bring "lint" Rake task into line with "Lint Ruby" stage on CI #1070

Merged

Conversation

floehopper
Copy link
Contributor

@floehopper floehopper commented May 8, 2017

According to the task description this is supposed to mimic the "Lint Ruby" stage run on Jenkins CI (see these lines & these lines). I've updated the govuk-lint-ruby options and directories in the Rake task to more closely match those used in the CI stage.

Note that this means we are now only checking code that has changed. Ideally we'd be checking all the code every time, but if we want to do that we should change the Jenkins CI build to do the same. It was very confusing that the two did not do the same thing.

Note also that we are no longer checking the following directories: bin, config & features. If we decide we want to do this then we should chage the Jenkins CI build to do the same.

I did contemplate trying to change the Jenkins CI build, but there doesn't seem to be an easy way to do this with the current govuk_jenkinslib.groovy code.

I've created the following issues to capture things that have come up while investigating this:

@floehopper floehopper added this to the Testing milestone May 8, 2017
@floehopper floehopper requested a review from chrislo May 8, 2017 10:02
According to the task description this is supposed to mimic the "Lint
Ruby" stage run on Jenkins CI [1,2]. I've updated the `govuk-lint-ruby`
options and directories in the Rake task to more closely match those
used in the CI stage.

Note that this means we are now only checking code that has changed.
Ideally we'd be checking all the code every time, but if we want to do
that we should change the Jenkins CI build to do the same.

Note also that we are no longer checking the following directories:
`bin`, `config` & `features`. If we decide we want to do this then we
should chage the Jenkins CI build to do the same.

I did contemplate trying to change the Jenkins CI build, but there
doesn't seem to be an easy way to do this with the current
`govuk_jenkinslib.groovy` code.

[1]: https://github.com/alphagov/govuk-puppet/blob/43af3ededf1fc289d63bbac3969176bed76ce147/modules/govuk_jenkins/files/var/lib/jenkins/groovy_scripts/govuk_jenkinslib.groovy#L138-L140
[2]: https://github.com/alphagov/govuk-puppet/blob/43af3ededf1fc289d63bbac3969176bed76ce147/modules/govuk_jenkins/files/var/lib/jenkins/groovy_scripts/govuk_jenkinslib.groovy#L378-L396
@chrislo
Copy link
Contributor

chrislo commented May 8, 2017

Good idea! As we just discussed there's probably some other changes we'd like to make around this and I see you're adding issues for them as I type :)

@floehopper
Copy link
Contributor Author

@chrislo: Thanks. Yes, I've added a list of them to the description of this PR.

Merging.

@floehopper floehopper merged commit 67c8df4 into master May 8, 2017
@floehopper floehopper deleted the make-lint-rake-task-more-similar-to-linting-on-jenkins-ci branch May 8, 2017 10:49
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.

None yet

2 participants