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

SPEC: Fix documentation example for ABC Size #3985

Merged
merged 1 commit into from Jan 30, 2017

Conversation

Projects
None yet
2 participants
@a-leung
Contributor

a-leung commented Jan 29, 2017

The given code example has an ABC size of 6.4, but comments list the
calculation as:

Math.sqrt(11 + 55 + 2*2)

which results in: 5.48.

The correct calculation for the given the example are:

Math.sqrt(11 + 66 + 2*2) = 6.40


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).
SPEC: Fix documentation example for ABC Size
The given code example has an ABC size of 6.4, but comments list the
calculation as:

Math.sqrt(1*1 + 5*5 + 2*2)

which results in: 5.48.

The correct calculation for the given the example are:

Math.sqrt(1*1 + 6*6 + 2*2) = 6.40

@bbatsov bbatsov merged commit 2ce51e1 into rubocop-hq:master Jan 30, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@bbatsov

This comment has been minimized.

Show comment
Hide comment
@bbatsov

bbatsov Jan 30, 2017

Collaborator

Wow! So impressive you managed to spot this! Thanks! 👍

Collaborator

bbatsov commented Jan 30, 2017

Wow! So impressive you managed to spot this! Thanks! 👍

@a-leung

This comment has been minimized.

Show comment
Hide comment
@a-leung

a-leung Jan 30, 2017

Contributor

no problem! I was doing some research on an article I wrote and found it.

thanks again for all your work on Rubocop!

Contributor

a-leung commented Jan 30, 2017

no problem! I was doing some research on an article I wrote and found it.

thanks again for all your work on Rubocop!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment