Skip to content

Commit 9cee975

Browse files
author
Shane da Silva
committed
Clean up new Location code
Modify the grammar of some comments and spec descriptions. Change-Id: I3ea4c82c6bb0e71372add6f451755dbf0017ec09 Reviewed-on: http://gerrit.causes.com/37224 Tested-by: jenkins <[email protected]> Reviewed-by: Shane da Silva <[email protected]>
1 parent 416f7ca commit 9cee975

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/scss_lint/linter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def add_lint(node_or_line, message)
3636
message)
3737
end
3838

39-
# Helper for creating location from a source range
39+
# Extract {SCSSLint::Location} from a {Sass::Source::Range}.
4040
#
4141
# @param range [Sass::Source::Range]
4242
# @return [SCSSLint::Location]

lib/scss_lint/location.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module SCSSLint
2-
# Stores a location of [Lint] in a source.
2+
# Stores a location of {Lint} in a source.
33
class Location
44
include Comparable
55

66
attr_reader :line, :column, :length
77

8-
# @param line [Integer] An one-based index
9-
# @param column [Integer] An one-based index
10-
# @param length [Integer] A length in the line
8+
# @param line [Integer] One-based index
9+
# @param column [Integer] One-based index
10+
# @param length [Integer] Number of characters, including the first character
1111
def initialize(line = 1, column = 1, length = 1)
1212
raise ArgumentError, "Line must be more than 0, passed #{line}" if line < 1
1313
raise ArgumentError, "Column must be more than 0, passed #{column}" if column < 1

spec/scss_lint/location_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
]
1818
end
1919

20-
it 'enables to sort locations' do
20+
it 'allows locations to be sorted' do
2121
locations.sort.should == [
2222
SCSSLint::Location.new(1, 1, 1),
2323
SCSSLint::Location.new(1, 1, 2),

0 commit comments

Comments
 (0)