-
Notifications
You must be signed in to change notification settings - Fork 39
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
Pronto integration #406
Pronto integration #406
Conversation
b624fda
to
824ea17
Compare
8efc5a9
to
24f2bfd
Compare
2dfe28c
to
b4fd9e3
Compare
Request in ManageIQ#406 to remove addition "column" information about the offence
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
@miq-bot remove_label unmergeable |
Request in ManageIQ#406 to remove addition "column" information about the offence
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
Integration of pronto required to add few new gems and to update some of the gems. The old method which provided the linter launching was reworked to launch pronto which provide the linter launching. The output of pronto is the result of all linters. The pronto result is transformed into a structure which match the original one. This integration required to change few tests and add new ones. Closes ManageIQ#192
Request in ManageIQ#406 to remove addition "column" information about the offence
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
Variable "inspected_file_count" in the result of the linters has been removed due to missing use. It was not used in the pull request comment describing the offenses detected by linters in the source code.
Pronto runners (linters) expected to run will be automatically required in the CodeAnalysisMixin based on Gemfile specifications for pronto runners (linters).
Checked commits europ/miq_bot@a7a279e~...7328482 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
This pull request is not mergeable. Please rebase and repush. |
Request in ManageIQ#406 to remove addition "column" information about the offence
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
So looking into updating this, as it pushes us into the direction of getting #499 moving forward: Aside from this conflicting with master, this also is having issues with the branch that I expect to be merged soon: There are a few weird down grades we are taking with dependent gems as a result:
(the above from the This is because of the pronto changes. Shouldn't be a big deal, but just a heads up. Currently trying to fix specs since regenerating the |
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
Closing in favor of #500 |
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
Pronto integration
Closes #192
Pronto supports a list of runners available in pronto/README.md which can be launched. To launch a runner, add the runner into
Gemfile
and require it properly in code_analysis_mixin.rb. The proper requiring is automated and now it is necessary to specify only the pronto gem.It was necessary due to integration of pronto to create a same data structure from the pronto output as the original was. The integration was done in file
app/workers/concerns/code_analysis_mixin.rb
inrun_all_linters
method where is the code analysis launched via pronto and the result is formatted to match the originall pattern of the result structure.Pronto result is an array of pronto messages which are iterated throught in order to create identical data structure of the former structure. The
pronto_result
method starts the pronto-runners a gather the informations and return an array of pronto messages. Therun_all_linters
method parses the array of pronto messages and creates a hash as the result. The hash structure contains all informations about the files inspected by pronto-runners which launch the corresponding linter.Due to some Pronto deficiencies few values are strictly defined, they were marked with
TODO
.NOTE: It was solved by removing theses variables (see the review comments below)
Syntactic errors which are missing from the result of the Pronto-RuboCop will be solved by Fix for syntax error discarding prontolabs/pronto-rubocop#35
Indention of the expected hash in
code_analysis_mixin_spec.rb
is extensive due to rubocop hash alignment correctnessInformations about the position of the offence (column, line, length) are changed and from now line position is the only one supported because of request in comments below
\cc
@skateman
@romanblanco