Skip to content

Getting Naming/FileName has the wrong namespace error on autocorrect #56

@prog1dev

Description

@prog1dev
Please add some general information about your environment:
  • Operating System - OS X El Captain 10.11.6
  • Sublime Text version - Sublime-text-3 build 3126
  • Rubocop gem version - 0.49.1
  • Details about your config e.g. do you use rbenv, rvm or your_own_command to run rubocop?
{
  "check_for_rvm": false,
  "check_for_rbenv": true,
  "show_auto_correct_warning": false,
  "mark_issues_in_view": false,
  "rbenv_path":  "/usr/local/bin/rbenv",
  "rubocop_config_file": ".rubocop.yml"
}
  • Details about your rubocop.yml config
---
AllCops:
  DisplayCopNames:    true
  DisplayStyleGuide:  true
  StyleGuideCopsOnly: true
  TargetRubyVersion:  2.1.5

Metrics/ParameterLists:
  Max: 5

Metrics/LineLength:
  Max: 120

Style/Alias:
  Enabled: false

Style/ClassAndModuleChildren:
  EnforcedStyle: compact

Style/FrozenStringLiteralComment:
  Enabled: false

Style/ModuleFunction:
  Enabled: false

Style/StringLiterals:
  EnforcedStyle: single_quotes

Style/StringLiteralsInInterpolation:
  EnforcedStyle: double_quotes

Naming/FileName:
  Enabled: false

Steps to reproduce:

Create .rubocop.yml file in your project root with settings as above. Try to autocorrect any ruby file with warnings via Command Palette.

In Sublime-Linter debug mode Im getting this error

~/projects/my_project/.rubocop.yml: Naming/FileName has the wrong namespace - should be Style 
SublimeLinter: No match for <_sre.SRE_Pattern object at 0x7fbc8059cb90>

Due to default.yml in rubocop github repo this is a correct setting. So command

rubocop --auto-correct path/to/file

works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions