Skip to content

Commit

Permalink
Tests our disallowing extra spacing on assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
searls committed Aug 8, 2019
1 parent 85a40d9 commit 985a67e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
18 changes: 9 additions & 9 deletions standard.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "standard/version"

Gem::Specification.new do |spec|
spec.name = "standard"
spec.version = Standard::VERSION
spec.authors = ["Justin Searls"]
spec.email = ["searls@gmail.com"]
spec.name = "standard"
spec.version = Standard::VERSION
spec.authors = ["Justin Searls"]
spec.email = ["searls@gmail.com"]

spec.summary = "Ruby Style Guide, with linter & automatic code fixer"
spec.homepage = "https://github.com/testdouble/standard"
spec.summary = "Ruby Style Guide, with linter & automatic code fixer"
spec.homepage = "https://github.com/testdouble/standard"

spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "rubocop", "~> 0.72.0"
Expand Down
4 changes: 2 additions & 2 deletions test/cop_invoker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class AnnotatedSource
#
# @return [AnnotatedSource]
def self.parse(annotated_source)
source = []
source = []
annotations = []

annotated_source.each_line do |source_line|
Expand All @@ -105,7 +105,7 @@ def self.parse(annotated_source)
# @note annotations are sorted so that reconstructing the annotation
# text via {#to_s} is deterministic
def initialize(lines, annotations)
@lines = lines.freeze
@lines = lines.freeze
@annotations = annotations.sort.freeze
end

Expand Down
2 changes: 2 additions & 0 deletions test/fixture/cli/autocorrectable-bad.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def do_stuff( a,b,c )
# some alignment opinions
class AlignyStuff
def self.enum(options)
a = 3
a + 4
end

enum event_type: {
Expand Down
2 changes: 2 additions & 0 deletions test/fixture/cli/autocorrectable-good.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def do_stuff(a, b, c)
# some alignment opinions
class AlignyStuff
def self.enum(options)
a = 3
a + 4
end

enum event_type: {
Expand Down

0 comments on commit 985a67e

Please sign in to comment.