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

Pronto integration #406

Closed
wants to merge 6 commits into from
Closed

Pronto integration #406

wants to merge 6 commits into from

Conversation

europ
Copy link
Member

@europ europ commented Feb 13, 2018

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 in run_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. The run_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 correctness

  • Informations 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

@europ europ force-pushed the Pronto branch 12 times, most recently from b624fda to 824ea17 Compare February 15, 2018 11:33
@europ europ changed the title Pronto integration [WIP] Pronto integration Feb 15, 2018
@miq-bot miq-bot added the wip label Feb 15, 2018
@europ europ force-pushed the Pronto branch 9 times, most recently from 8efc5a9 to 24f2bfd Compare February 21, 2018 08:39
@europ europ changed the title [WIP] Pronto integration Pronto integration Feb 21, 2018
@miq-bot miq-bot removed the wip label Feb 21, 2018
@europ europ force-pushed the Pronto branch 5 times, most recently from 2dfe28c to b4fd9e3 Compare February 23, 2018 09:08
europ added a commit to europ/miq_bot that referenced this pull request Mar 6, 2018
Request in ManageIQ#406 to remove addition "column" information about the offence
europ added a commit to europ/miq_bot that referenced this pull request Mar 6, 2018
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
@europ
Copy link
Member Author

europ commented Mar 13, 2018

@miq-bot remove_label unmergeable

europ added a commit to europ/miq_bot that referenced this pull request Apr 9, 2018
Request in ManageIQ#406 to remove addition "column" information about the offence
europ added a commit to europ/miq_bot that referenced this pull request Apr 9, 2018
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
@europ europ mentioned this pull request Apr 26, 2018
europ added 6 commits May 16, 2018 16:52
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).
@miq-bot
Copy link
Member

miq-bot commented May 16, 2018

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
8 files checked, 0 offenses detected
Everything looks fine. 🍪

@miq-bot
Copy link
Member

miq-bot commented Mar 20, 2019

This pull request is not mergeable. Please rebase and repush.

europ added a commit to europ/miq_bot that referenced this pull request Mar 21, 2019
Request in ManageIQ#406 to remove addition "column" information about the offence
europ added a commit to europ/miq_bot that referenced this pull request Mar 21, 2019
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
@NickLaMuro NickLaMuro mentioned this pull request May 7, 2020
@NickLaMuro
Copy link
Member

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:

#498

There are a few weird down grades we are taking with dependent gems as a result:

Note: rainbow version regressed from 3.0.0 to 2.2.2
Note: thor version regressed from 1.0.1 to 0.19.4

(the above from the bundler output).

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 results.json files is not going smoothly at the moment...

NickLaMuro pushed a commit to NickLaMuro/miq_bot that referenced this pull request May 8, 2020
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
@Fryguy
Copy link
Member

Fryguy commented May 18, 2020

Closing in favor of #500

@Fryguy Fryguy closed this May 18, 2020
NickLaMuro pushed a commit to NickLaMuro/miq_bot that referenced this pull request May 18, 2020
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
NickLaMuro pushed a commit to NickLaMuro/miq_bot that referenced this pull request Sep 8, 2020
Request in ManageIQ#406 to remove files in lib/linter/ which are not used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review pull requests using pronto
7 participants