diff --git a/.arclint b/.arclint --- a/.arclint +++ b/.arclint @@ -1,7 +1,6 @@ { "exclude": [ - "(^externals/)", - "(\\.lint-test$)" + "(^externals/)" ], "linters": { "chmod": { @@ -41,19 +40,7 @@ "exclude": "(^resources/spelling/.*\\.json$)" }, "text": { - "type": "text", - "exclude": [ - "(^\\.arclint$)" - ] - }, - "text-without-length": { - "type": "text", - "severity": { - "3": "disabled" - }, - "include": [ - "(^\\.arclint$)" - ] + "type": "text" }, "xhpast": { "type": "xhpast", diff --git a/.editorconfig b/.editorconfig --- a/.editorconfig +++ b/.editorconfig @@ -3,24 +3,50 @@ [*] indent_style = space indent_size = 2 +end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true +max_line_length = 80 + +[src/lint/linter/__tests__/**.lint-test] +indent_style = +end_of_line = +max_line_length = +trim_trailing_whitespace = [src/parser/__tests__/bundle/*] -trim_trailing_whitespace = false insert_final_newline = false -[src/parser/__tests__/diff/*.{git,hg,svn,u}diff] +[src/parser/__tests__/diff/*.{git,hg,rcs,svn,u}diff] +indent_style = trim_trailing_whitespace = false insert_final_newline = false +max_line_length = + +[src/parser/__tests__/patches/*.{git,hg,rcs,svn,u}patch] +indent_style = +trim_trailing_whitespace = false +max_line_length = [src/parser/__tests__/patches/*.gitpatch] +end_of_line = + +[src/parser/__tests__/**/*.txt] +max_line_length = + +[src/repository/parser/__tests__/mercurial/*.txt] trim_trailing_whitespace = false insert_final_newline = false +max_line_length = + +[src/unit/parser/__tests__/testresults/go.*] +indent_style = + +[src/unit/parser/__tests__/testresults/xunit.*] +max_line_length = [externals/**] -; Use editor default (possible autodetection). indent_style = indent_size = trim_trailing_whitespace = false diff --git a/LICENSE b/LICENSE --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/scripts/breakout.py b/scripts/breakout.py --- a/scripts/breakout.py +++ b/scripts/breakout.py @@ -166,7 +166,11 @@ h = height / 10 for x in range(1, width / 7 - 1): for y in range(1, 7): - entities.append(Block(x * 7, y * h + x / 2 % 2, 7, h, colors[y - 1])) + entities.append(Block(x * 7, + y * h + x / 2 % 2, + 7, + h, + colors[y - 1])) while True: while select.select([ sys.stdin ], [], [], 0)[0]: diff --git a/src/lint/linter/__tests__/gjslint/gjslint.lint-test b/src/lint/linter/__tests__/gjslint/gjslint.lint-test --- a/src/lint/linter/__tests__/gjslint/gjslint.lint-test +++ b/src/lint/linter/__tests__/gjslint/gjslint.lint-test @@ -17,4 +17,4 @@ error:4: error:5: error:7: -error:9: \ No newline at end of file +error:9: diff --git a/src/lint/linter/__tests__/jshint/jshint.lint-test b/src/lint/linter/__tests__/jshint/jshint.lint-test --- a/src/lint/linter/__tests__/jshint/jshint.lint-test +++ b/src/lint/linter/__tests__/jshint/jshint.lint-test @@ -8,4 +8,4 @@ ~~~~~~~~~~ warning:3:8 -error:7:1 \ No newline at end of file +error:7:1 diff --git a/src/lint/linter/__tests__/lessc/css.lint-test b/src/lint/linter/__tests__/lessc/css.lint-test --- a/src/lint/linter/__tests__/lessc/css.lint-test +++ b/src/lint/linter/__tests__/lessc/css.lint-test @@ -82,7 +82,7 @@ background: -webkit-gradient(linear, left top, left bottom, from(red), to(blue)); margin: ; .nested-multiple { - multiple-semi-colons: yes;;;;;; + multiple-semi-colons: yes;;;;;; }; filter: alpha(opacity=100); width: auto\9; diff --git a/src/lint/linter/__tests__/lessc/extract-and-length.lint-test b/src/lint/linter/__tests__/lessc/extract-and-length.lint-test --- a/src/lint/linter/__tests__/lessc/extract-and-length.lint-test +++ b/src/lint/linter/__tests__/lessc/extract-and-length.lint-test @@ -1,4 +1,3 @@ - // simple array/list: .multiunit { diff --git a/src/lint/linter/__tests__/lessc/functions.lint-test b/src/lint/linter/__tests__/lessc/functions.lint-test --- a/src/lint/linter/__tests__/lessc/functions.lint-test +++ b/src/lint/linter/__tests__/lessc/functions.lint-test @@ -62,11 +62,11 @@ format-single-quoted: %('hello %s', "single world"); format-escaped-string: %(~"hello %s", "escaped world"); eformat: e(%("rgb(%d, %d, %d)", @r, 128, 64)); - + unitless: unit(12px); unit: unit((13px + 1px), em); unitpercentage: unit(100, %); - + get-unit: get-unit(10px); get-unit-empty: get-unit(10); @@ -118,7 +118,7 @@ fade-out: fadeOut(red, 5%); // support fadeOut and fadeout fade-in: fadein(fadeout(red, 10%), 5%); - + hsv: hsv(5, 50%, 30%); hsva: hsva(3, 50%, 30%, 0.2); diff --git a/src/lint/linter/__tests__/lessc/media.lint-test b/src/lint/linter/__tests__/lessc/media.lint-test --- a/src/lint/linter/__tests__/lessc/media.lint-test +++ b/src/lint/linter/__tests__/lessc/media.lint-test @@ -1,4 +1,3 @@ - // For now, variables can't be declared inside @media blocks. @var: 42; diff --git a/src/lint/linter/__tests__/lessc/selectors.lint-test b/src/lint/linter/__tests__/lessc/selectors.lint-test --- a/src/lint/linter/__tests__/lessc/selectors.lint-test +++ b/src/lint/linter/__tests__/lessc/selectors.lint-test @@ -41,9 +41,9 @@ .qux & { display: inline; } - .qux& { - display: inline-block; - } + .qux& { + display: inline-block; + } .qux & .biz { display: none; } @@ -123,7 +123,7 @@ } @num: 3; :nth-child(@{num}) { - selector: interpolated; + selector: interpolated; } .test { &:nth-child(odd):not(:nth-child(3)) { diff --git a/src/lint/linter/__tests__/phlxhp/deprecated-function.lint-test b/src/lint/linter/__tests__/phlxhp/deprecated-function.lint-test --- a/src/lint/linter/__tests__/phlxhp/deprecated-function.lint-test +++ b/src/lint/linter/__tests__/phlxhp/deprecated-function.lint-test @@ -3,4 +3,4 @@ deprecated_function(); modern_function(); ~~~~~~~~~~ -warning:3:1 \ No newline at end of file +warning:3:1 diff --git a/src/lint/linter/__tests__/phlxhp/ragged-classtree-edges.lint-test b/src/lint/linter/__tests__/phlxhp/ragged-classtree-edges.lint-test --- a/src/lint/linter/__tests__/phlxhp/ragged-classtree-edges.lint-test +++ b/src/lint/linter/__tests__/phlxhp/ragged-classtree-edges.lint-test @@ -9,4 +9,4 @@ */ class D { } ~~~~~~~~~~ -warning:3:7 \ No newline at end of file +warning:3:7 diff --git a/src/lint/linter/__tests__/phpcs/basics.lint-test b/src/lint/linter/__tests__/phpcs/basics.lint-test --- a/src/lint/linter/__tests__/phpcs/basics.lint-test +++ b/src/lint/linter/__tests__/phpcs/basics.lint-test @@ -10,4 +10,4 @@ error:3:1 error:3:14 error:4:3 -error:6:3 \ No newline at end of file +error:6:3 diff --git a/src/lint/linter/__tests__/text/dos-newline.lint-test b/src/lint/linter/__tests__/text/dos-newline.lint-test --- a/src/lint/linter/__tests__/text/dos-newline.lint-test +++ b/src/lint/linter/__tests__/text/dos-newline.lint-test @@ -1,5 +1,5 @@ -The quick brown fox -jumps over the lazy dog. +The quick brown fox +jumps over the lazy dog. ~~~~~~~~~~ error:1:1 ~~~~~~~~~~ diff --git a/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test b/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test --- a/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test +++ b/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test @@ -2,4 +2,4 @@ This shouldn't fatal the parser. ~~~~~~~~~~ -error:1:10 \ No newline at end of file +error:1:10 diff --git a/src/lint/linter/__tests__/xhpast/exit-expression.lint-test b/src/lint/linter/__tests__/xhpast/exit-expression.lint-test --- a/src/lint/linter/__tests__/xhpast/exit-expression.lint-test +++ b/src/lint/linter/__tests__/xhpast/exit-expression.lint-test @@ -5,4 +5,4 @@ ~~~~~~~~~~ error:3:1 warning:3:6 -error:4:17 \ No newline at end of file +error:4:17 diff --git a/src/lint/linter/__tests__/xhpast/surprising-constructors.lint-test b/src/lint/linter/__tests__/xhpast/surprising-constructors.lint-test --- a/src/lint/linter/__tests__/xhpast/surprising-constructors.lint-test +++ b/src/lint/linter/__tests__/xhpast/surprising-constructors.lint-test @@ -6,4 +6,4 @@ } ~~~~~~~~~~ error:2:13 XHP19 Class-Filename Mismatch -error:3:19 \ No newline at end of file +error:3:19 diff --git a/src/lint/linter/__tests__/xhpast/windows.lint-test b/src/lint/linter/__tests__/xhpast/windows.lint-test --- a/src/lint/linter/__tests__/xhpast/windows.lint-test +++ b/src/lint/linter/__tests__/xhpast/windows.lint-test @@ -5,4 +5,9 @@ error:3:1 ~~~~~~~~~~ ~~~~~~~~~~ -{"config": {"xhpast.php-version": "5.2.3", "xhpast.php-version.windows": "5.3.0"}} +{ + "config": { + "xhpast.php-version": "5.2.3", + "xhpast.php-version.windows": "5.3.0" + } +} diff --git a/src/parser/__tests__/diff/more-newlines.svndiff b/src/parser/__tests__/diff/more-newlines.svndiff --- a/src/parser/__tests__/diff/more-newlines.svndiff +++ b/src/parser/__tests__/diff/more-newlines.svndiff @@ -1,13 +1,13 @@ -Index: Database/tables/dbo.Account.sql -=================================================================== ---- Database/tables/dbo.Account.sql (revision 1587) -+++ Database/tables/dbo.Account.sql (working copy) -@@ -23,6 +23,8 @@ - GO - CREATE CLUSTERED INDEX IX_Account ON [Account] ([CreationDateTime]) - GO -+ALTER TABLE [dbo].[Account] ADD CONSTRAINT [UK_Account_APIKey] UNIQUE ([APIKey]) -+GO - ALTER TABLE [dbo].[Account] ADD CONSTRAINT [DF_Account_AccountId] DEFAULT (newid()) FOR [AccountId] - GO - ALTER TABLE [dbo].[Account] ADD CONSTRAINT [DF_Account_CreationDateTime] DEFAULT (getutcdate()) FOR [CreationDateTime] +Index: Database/tables/dbo.Account.sql +=================================================================== +--- Database/tables/dbo.Account.sql (revision 1587) ++++ Database/tables/dbo.Account.sql (working copy) +@@ -23,6 +23,8 @@ + GO + CREATE CLUSTERED INDEX IX_Account ON [Account] ([CreationDateTime]) + GO ++ALTER TABLE [dbo].[Account] ADD CONSTRAINT [UK_Account_APIKey] UNIQUE ([APIKey]) ++GO + ALTER TABLE [dbo].[Account] ADD CONSTRAINT [DF_Account_AccountId] DEFAULT (newid()) FOR [AccountId] + GO + ALTER TABLE [dbo].[Account] ADD CONSTRAINT [DF_Account_CreationDateTime] DEFAULT (getutcdate()) FOR [CreationDateTime] diff --git a/src/parser/__tests__/diff/svn-property-windows.svndiff b/src/parser/__tests__/diff/svn-property-windows.svndiff --- a/src/parser/__tests__/diff/svn-property-windows.svndiff +++ b/src/parser/__tests__/diff/svn-property-windows.svndiff @@ -1,11 +1,11 @@ -Index: .arcconfig -=================================================================== ---- .arcconfig (revision 1957) -+++ .arcconfig (working copy) - -Property changes on: .arcconfig -___________________________________________________________________ -Added: herp -## -0,0 +1 ## -+derp +Index: .arcconfig +=================================================================== +--- .arcconfig (revision 1957) ++++ .arcconfig (working copy) + +Property changes on: .arcconfig +___________________________________________________________________ +Added: herp +## -0,0 +1 ## ++derp \ No newline at end of property diff --git a/src/unit/parser/__tests__/testresults/xunit.no-tests b/src/unit/parser/__tests__/testresults/xunit.no-tests --- a/src/unit/parser/__tests__/testresults/xunit.no-tests +++ b/src/unit/parser/__tests__/testresults/xunit.no-tests @@ -1 +1 @@ - \ No newline at end of file +