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

Move Lint/Eval to Security/Eval #3820

Merged
merged 1 commit into from
Dec 24, 2016
Merged

Move Lint/Eval to Security/Eval #3820

merged 1 commit into from
Dec 24, 2016

Conversation

cyberdelia
Copy link
Contributor

@cyberdelia cyberdelia commented Dec 24, 2016

This is a proposal to move the Eval cop to Security/Eval, this is in order to have all the security checks under the same umbrella.

I'm not sure about the transition, I'm open to suggestions.


Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Used the same coding conventions as the rest of the project.
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • All tests are passing.
  • The new code doesn't generate RuboCop offenses.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Updated cop documentation with rake generate_cops_documentation (required only when you've added a new cop or changed the configuration/documentation of an existing cop).

@Drenmi
Copy link
Collaborator

Drenmi commented Dec 24, 2016

Makes sense, but would probably require a CHANGELOG entry, because it will break configurations for users referencing it in their .rubocop.yml. 😀

@cyberdelia
Copy link
Contributor Author

I intentionally did not do some of the work, waiting to see if that idea gain consensus.

@bbatsov
Copy link
Collaborator

bbatsov commented Dec 24, 2016 via email

@@ -4,6 +4,7 @@

### New features

* [#3820](https://github.com/bbatsov/rubocop/pull/3820): Rename `Lint/Eval` to `Security/Eval`. ([@cyberdelia][])
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should actually be under "Changes".

@bbatsov
Copy link
Collaborator

bbatsov commented Dec 24, 2016

You'll also have to rebase this due to the fact your other PR just got merged.

@cyberdelia
Copy link
Contributor Author

Rebased and changed.

@bbatsov bbatsov merged commit 3bdbca7 into rubocop:master Dec 24, 2016
@cyberdelia cyberdelia deleted the eval-sec branch December 24, 2016 19:58
pocke added a commit to pocke/rubocop that referenced this pull request Jan 14, 2017
This change improves obsolete warnings in three ways.

1. Show all obsoletes
--------

Currently, RuboCop displays first obsolete warning only.

```yaml
 # two obsolete cops
Style/SingleSpaceBeforeFirstArg:
  Enabled: false
Style/SpaceBeforeModifierKeyword:
  Enabled: false
```

```
Error: The `Style/SingleSpaceBeforeFirstArg` cop has been renamed to `Style/SpaceBeforeFirstArg.
(obsolete configuration found in /tmp/tmp.9T2ers7SW8/.rubocop.yml, please update it)
```

This change makes to display all obsolete warnings.

```
Error: The `Style/SingleSpaceBeforeFirstArg` cop has been renamed to `Style/SpaceBeforeFirstArg.`
(obsolete configuration found in /tmp/tmp.9T2ers7SW8/.rubocop.yml, please update it)
The `Style/SpaceBeforeModifierKeyword` cop has been removed. Please use `Style/SpaceAroundKeyword` instead.
(obsolete configuration found in /tmp/tmp.9T2ers7SW8/.rubocop.yml, please update it)
```

2. Add obsolete cops
---------

`Style/MethodCallParentheses` and `Lint/Eval` are renamed.
- rubocop#3797
- rubocop#3820

So, I added the cops to `OBSOLATE_COPS`.

3. Add obsolete parameters

In rubocop#3765, some cop's parameters are renamed.

So, I added the parameters to `OBSOLATE_PARAMETERS`
@pocke pocke mentioned this pull request Jan 14, 2017
11 tasks
bbatsov pushed a commit that referenced this pull request Jan 14, 2017
This change improves obsolete warnings in three ways.

1. Show all obsoletes
--------

Currently, RuboCop displays first obsolete warning only.

```yaml
 # two obsolete cops
Style/SingleSpaceBeforeFirstArg:
  Enabled: false
Style/SpaceBeforeModifierKeyword:
  Enabled: false
```

```
Error: The `Style/SingleSpaceBeforeFirstArg` cop has been renamed to `Style/SpaceBeforeFirstArg.
(obsolete configuration found in /tmp/tmp.9T2ers7SW8/.rubocop.yml, please update it)
```

This change makes to display all obsolete warnings.

```
Error: The `Style/SingleSpaceBeforeFirstArg` cop has been renamed to `Style/SpaceBeforeFirstArg.`
(obsolete configuration found in /tmp/tmp.9T2ers7SW8/.rubocop.yml, please update it)
The `Style/SpaceBeforeModifierKeyword` cop has been removed. Please use `Style/SpaceAroundKeyword` instead.
(obsolete configuration found in /tmp/tmp.9T2ers7SW8/.rubocop.yml, please update it)
```

2. Add obsolete cops
---------

`Style/MethodCallParentheses` and `Lint/Eval` are renamed.
- #3797
- #3820

So, I added the cops to `OBSOLATE_COPS`.

3. Add obsolete parameters

In #3765, some cop's parameters are renamed.

So, I added the parameters to `OBSOLATE_PARAMETERS`
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.

3 participants