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

Exclude malformed file from codeclimate configuration #9910

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

andreslucena
Copy link
Member

@andreslucena andreslucena commented Oct 19, 2022

🎩 What? Why?

On the last few weeks we're seeing a flaky spec on Codeclimate. The full error message says:

An engine encountered an error
View the build
E10 Error

We had trouble running the grep engine.

The engine's output shown below may indicate the cause of the error.

If not, please contact us so we can investigate further.

undefined method `gsub' for nil:NilClass

This is visible on some PRs, for instance https://codeclimate.com/github/decidim/decidim/pull/9909

This PR fixes it.

📌 Related Issues

Testing

  1. Install the codeclimate CLI locally
curl -L https://github.com/codeclimate/codeclimate/archive/master.tar.gz | tar xvz
cd codeclimate-* && sudo make install
  1. For checking the failure, run the grep engine on develop.
codeclimate analyze -e grep

See the error:

  1. For checking the fix, run the grep engine on this branch:
gh pr checkout 9910
codeclimate analyze -e grep

See that it runs without the exception

♥️ Thank you!

@andreslucena andreslucena added the type: internal PRs that aren't necessary to add to the CHANGELOG for implementers label Oct 19, 2022
@andreslucena
Copy link
Member Author

As I've mentioned in the meeting, I think that codeclimate it's still failing in the check because it's using the default branch configuration. You can still test this locally with the instructions that are in the PR body.

Copy link
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

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

Tested without this PR, got the error.

With this PR no more error with this message:

Analysis complete! Found 20,546 issues.

Errors are coming locally from the NPM packages and code coverage reports, so they should be fine when running the actual analysis.

Great work! 🎉

@ahukkanen ahukkanen merged commit 8ed0c3e into develop Oct 25, 2022
@ahukkanen ahukkanen deleted the chore/fix-codeclimate branch October 25, 2022 06:22
eliegaboriau pushed a commit to eliegaboriau/decidim that referenced this pull request Oct 25, 2022
entantoencuanto added a commit that referenced this pull request Oct 26, 2022
* develop: (35 commits)
  Install turbo-rails (#9881)
  Fix conference invitations (#9664)
  Fix invalid rendering of meeting and proposal body texts (#9764)
  Make documentation site work with multiple versions (#9917)
  Bump versions on install docs (#9916)
  Standardize CSV import formats and fix private users CSV import with invalid file (#9627)
  Fix: The i18n locales selector is showing a dropdown with 3 languages (#9902)
  Make Scopes field in debates translatable (#9903)
  Make ToS agreement translatable (#9909)
  Fix issues with a11y specs (#9929)
  Remove invitations badge (#9906)
  Make initiatives order translatable (#9905)
  Add missing active actions on admin navigation menu (#9904)
  Fix user sign up with invalid name (#9896)
  Remove duplication of LastActivity queries (#9895)
  Rename IgnoredMethods to AllowedMethods in Rubocop configuration (#9893)
  Exclude malformed file from codeclimate configuration (#9910)
  Fix correct resource linking for amendments (#9887)
  Fix superposition in admin's error forms (#9871)
  Add missing i18n key in Initiatives (#9892)
  ...
entantoencuanto added a commit that referenced this pull request Oct 31, 2022
* develop: (36 commits)
  Fix proposal etiquette and length validator with base64 images (#9639)
  Install turbo-rails (#9881)
  Fix conference invitations (#9664)
  Fix invalid rendering of meeting and proposal body texts (#9764)
  Make documentation site work with multiple versions (#9917)
  Bump versions on install docs (#9916)
  Standardize CSV import formats and fix private users CSV import with invalid file (#9627)
  Fix: The i18n locales selector is showing a dropdown with 3 languages (#9902)
  Make Scopes field in debates translatable (#9903)
  Make ToS agreement translatable (#9909)
  Fix issues with a11y specs (#9929)
  Remove invitations badge (#9906)
  Make initiatives order translatable (#9905)
  Add missing active actions on admin navigation menu (#9904)
  Fix user sign up with invalid name (#9896)
  Remove duplication of LastActivity queries (#9895)
  Rename IgnoredMethods to AllowedMethods in Rubocop configuration (#9893)
  Exclude malformed file from codeclimate configuration (#9910)
  Fix correct resource linking for amendments (#9887)
  Fix superposition in admin's error forms (#9871)
  ...
Quentinchampenois pushed a commit to Quentinchampenois/decidim that referenced this pull request Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: internal PRs that aren't necessary to add to the CHANGELOG for implementers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants