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

Bug with Metrics/ModuleLength #1948

Closed
justin808 opened this issue Jun 4, 2015 · 5 comments
Closed

Bug with Metrics/ModuleLength #1948

justin808 opened this issue Jun 4, 2015 · 5 comments

Comments

@justin808
Copy link

Problem with latest release 0.31.0.

This problem does not show on prior versions.

We're not customizing this.

Offenses:
app/models/importers/import_utility.rb:10:3: C: Metrics/ModuleLength: Module definition is too long. [166/100]
  module ImportUtility
  ^^^^^^
spec/adv_import/mappers/fixtures.rb:1:1: C: Metrics/ModuleLength: Module definition is too long. [602/100]
module AdvImport::Fixtures
^^^^^^

Here's the files

module Importers
  module ImportUtility

and

module AdvImport::Fixtures
@jonas054
Copy link
Collaborator

jonas054 commented Jun 5, 2015

I get the impression that you think the offenses are related to the names of the modules, but it's about the number of source code lines inside them.

@bquorning
Copy link
Contributor

Reminds me of #1851. Maybe we could change the message to mention that it’s about the number of lines in the module/class?

@jonas054
Copy link
Collaborator

jonas054 commented Jun 5, 2015

Yeah, the MethodLength cop says "Method has too many lines". Let's change ClassLength and ModuleLength to use the same wording.

@bquorning
Copy link
Contributor

@jonas054 I’ll open a PR.

@bquorning
Copy link
Contributor

Fixed in #1950, can be closed now.

@bbatsov bbatsov closed this as completed Jun 6, 2015
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

No branches or pull requests

4 participants