]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix text lint issues
authorJoshua Spence <josh@joshuaspence.com>
Tue, 7 Apr 2015 08:09:26 +0000 (18:09 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Tue, 7 Apr 2015 08:09:27 +0000 (18:09 +1000)
Summary: Ref T5105. This is a proof-of-concept for D11458.

Test Plan: `arc lint --everything`

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5105

Differential Revision: https://secure.phabricator.com/D11640

22 files changed:
.arclint
.editorconfig
LICENSE
scripts/breakout.py
src/lint/linter/__tests__/gjslint/gjslint.lint-test
src/lint/linter/__tests__/jshint/jshint.lint-test
src/lint/linter/__tests__/lessc/css.lint-test
src/lint/linter/__tests__/lessc/extract-and-length.lint-test
src/lint/linter/__tests__/lessc/functions.lint-test
src/lint/linter/__tests__/lessc/media.lint-test
src/lint/linter/__tests__/lessc/selectors.lint-test
src/lint/linter/__tests__/phlxhp/deprecated-function.lint-test
src/lint/linter/__tests__/phlxhp/ragged-classtree-edges.lint-test
src/lint/linter/__tests__/phpcs/basics.lint-test
src/lint/linter/__tests__/text/dos-newline.lint-test
src/lint/linter/__tests__/xhpast/embedded-tags.lint-test
src/lint/linter/__tests__/xhpast/exit-expression.lint-test
src/lint/linter/__tests__/xhpast/surprising-constructors.lint-test
src/lint/linter/__tests__/xhpast/windows.lint-test
src/parser/__tests__/diff/more-newlines.svndiff
src/parser/__tests__/diff/svn-property-windows.svndiff
src/unit/parser/__tests__/testresults/xunit.no-tests

index 438101edb4128b47e38e72896d13581a077322e4..816de021187bab1eb927437d713885cae5b97064 100644 (file)
--- a/.arclint
+++ b/.arclint
@@ -1,7 +1,6 @@
 {
   "exclude": [
-    "(^externals/)",
-    "(\\.lint-test$)"
+    "(^externals/)"
   ],
   "linters": {
     "chmod": {
       "exclude": "(^resources/spelling/.*\\.json$)"
     },
     "text": {
-      "type": "text",
-      "exclude": [
-        "(^\\.arclint$)"
-      ]
-    },
-    "text-without-length": {
-      "type": "text",
-      "severity": {
-        "3": "disabled"
-      },
-      "include": [
-        "(^\\.arclint$)"
-      ]
+      "type": "text"
     },
     "xhpast": {
       "type": "xhpast",
index cbf4b57ab471afdd2ae50fc6437a5ec140627383..0b1c0e67cfbf36e43a079a4413a76a8ade4a6e52 100644 (file)
@@ -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
index f433b1a53f5b830a205fd2df78e2b34974656c7b..d9a10c0d8e868ebf8da0b3dc95bb0be634c34bfe 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,3 @@
-
                                  Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/
index 9cb2e5616d41c013d0da1ce4dba7da2521d643f2..4ee3af11425cc185d3d0b58a15c2a0107947cff0 100755 (executable)
@@ -166,7 +166,11 @@ def main(stdscr):
     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]:
index 64c5c3318a7e2fdaa98c8147688362c621925d2b..e745f9c7cab0268089452382d9d471b85d02b6fd 100644 (file)
@@ -17,4 +17,4 @@ error:2:
 error:4:
 error:5:
 error:7:
-error:9:
\ No newline at end of file
+error:9:
index 287f7e95c3cb1ea1c1b16c81c563b274139e2614..fa6d22491ad7c567db4597d721a080319deb4a4a 100644 (file)
@@ -8,4 +8,4 @@ function f() {
 
 ~~~~~~~~~~
 warning:3:8
-error:7:1
\ No newline at end of file
+error:7:1
index cb0ceb10dafd42715956b3207738dc8c961420be..59d5b282e72e5bf16a50e5fd6627be94f7d436ec 100644 (file)
@@ -82,7 +82,7 @@ p + h1 {
   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;
index dcb8352d86994649f791cdf5cfe37b0cf74e5bbb..ac616f79f09cfead4b90d39d70cb4ae274fec374 100644 (file)
@@ -1,4 +1,3 @@
-
 // simple array/list:
 
 .multiunit {
index a1852af9a93fd2357434282abfba74f59531fc49..99d2260ea8d5fad7bc1eff33d0f4f697ea5996ce 100644 (file)
   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);
 
 
   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);
 
index 4a8a8b425052ddab836940e339c15158faa82998..47fdb93858f4fbfe34e8f92220706c7945c0be3d 100644 (file)
@@ -1,4 +1,3 @@
-
 // For now, variables can't be declared inside @media blocks.
 
 @var: 42;
index c64ced6b09cf111b8181349f68e8eff844f9fea4..d76caa9b1069c90483d1c3824a9fb01606bebfee 100644 (file)
@@ -41,9 +41,9 @@ a {
     .qux & {
       display: inline;
     }
-       .qux& {
-         display: inline-block;
-       }
+    .qux& {
+      display: inline-block;
+    }
     .qux & .biz {
       display: none;
     }
@@ -123,7 +123,7 @@ a {
 }
 @num: 3;
 :nth-child(@{num}) {
-       selector: interpolated;
+  selector: interpolated;
 }
 .test {
   &:nth-child(odd):not(:nth-child(3)) {
index f993c0a356a21e31aadd04574db54fba2bc06088..25ce3c9631ca7755322e03b68d33c29b08e5c99a 100644 (file)
@@ -3,4 +3,4 @@
 deprecated_function();
 modern_function();
 ~~~~~~~~~~
-warning:3:1
\ No newline at end of file
+warning:3:1
index 9e18089c35223c67464788e3aa321d4fecf62ac3..2496435f7c16909684aa1878844c2806fc9e2b38 100644 (file)
@@ -9,4 +9,4 @@ final class C { }
  */
 class D { }
 ~~~~~~~~~~
-warning:3:7
\ No newline at end of file
+warning:3:7
index a69827a0879a57d1763803a5c4836bac2a0a7ad5..dbf92c133ec79bf493ae39987358121e5ed249c3 100644 (file)
@@ -10,4 +10,4 @@ error:2:1
 error:3:1
 error:3:14
 error:4:3
-error:6:3
\ No newline at end of file
+error:6:3
index 5ff143d04579568caca55ca3f4f22619dc136ecd..314947e12a52f86fe50f0d72198f6000bf41013d 100644 (file)
@@ -1,5 +1,5 @@
-The quick brown fox\r
-jumps over the lazy dog.\r
+The quick brown fox
+jumps over the lazy dog.
 ~~~~~~~~~~
 error:1:1
 ~~~~~~~~~~
index 0c2e4afb62e4d983b55df1fcc8e5efc2bf0e64ff..b9f6be44b65d3d5a1ef9d8e0375d75920e8be4b1 100644 (file)
@@ -2,4 +2,4 @@
 
 This shouldn't fatal the parser.
 ~~~~~~~~~~
-error:1:10
\ No newline at end of file
+error:1:10
index 55e8b048a843ede7699beb5d0bb5a72f6b66ad23..96fbeb6f02ef1fb5652ea06d91e30c524c3817fa 100644 (file)
@@ -5,4 +5,4 @@ strtoupper(33 * exit - 6);
 ~~~~~~~~~~
 error:3:1
 warning:3:6
-error:4:17
\ No newline at end of file
+error:4:17
index f68e36975700a484cf8868ca1e627c10c76d8795..384787e628771046e19a8299f49c31a7e2901a28 100644 (file)
@@ -6,4 +6,4 @@ final class Platypus {
 }
 ~~~~~~~~~~
 error:2:13 XHP19 Class-Filename Mismatch
-error:3:19
\ No newline at end of file
+error:3:19
index b104714f51fbcfd952e88b6b9cc2a6ab628280f1..3c1fece23e619c1d9748884379bb2efc47d58424 100644 (file)
@@ -5,4 +5,9 @@ chroot('/tmp');
 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"
+  }
+}
index ce40e70a7430cbca62cc73d2cfc0b2c4c0d91f8b..18e85f8a6e418e46446dd33a8496c5e567fe9ce8 100644 (file)
@@ -1,13 +1,13 @@
-Index: Database/tables/dbo.Account.sql\r
-===================================================================\r
---- Database/tables/dbo.Account.sql    (revision 1587)\r
-+++ Database/tables/dbo.Account.sql    (working copy)\r
-@@ -23,6 +23,8 @@\r
- GO\r
- CREATE CLUSTERED INDEX IX_Account ON [Account] ([CreationDateTime])\r
- GO\r
-+ALTER TABLE [dbo].[Account] ADD CONSTRAINT [UK_Account_APIKey] UNIQUE ([APIKey])\r
-+GO\r
- ALTER TABLE [dbo].[Account] ADD  CONSTRAINT [DF_Account_AccountId]  DEFAULT (newid()) FOR [AccountId]\r
- GO\r
- ALTER TABLE [dbo].[Account] ADD  CONSTRAINT [DF_Account_CreationDateTime]  DEFAULT (getutcdate()) FOR [CreationDateTime]\r
+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 bbe367fe4537e188e7b0a96fcb7e65208332cc68..1ca3d7d14563cf0540f1d6a2ac44e10451a456a5 100644 (file)
@@ -1,11 +1,11 @@
-Index: .arcconfig\r
-===================================================================\r
---- .arcconfig  (revision 1957)\r
-+++ .arcconfig  (working copy)\r
-\r
-Property changes on: .arcconfig\r
-___________________________________________________________________\r
-Added: herp\r
-## -0,0 +1 ##\r
-+derp\r
+Index: .arcconfig
+===================================================================
+--- .arcconfig  (revision 1957)
++++ .arcconfig  (working copy)
+
+Property changes on: .arcconfig
+___________________________________________________________________
+Added: herp
+## -0,0 +1 ##
++derp
 \ No newline at end of property
index 11aa536589d9e582216fee5a45c5b46daa1f40db..219841a2c9042900037d8e3d39f8971486fd2431 100644 (file)
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuite name="" errors="0" failures="0" skips="0" tests="0" time="0.001" ></testsuite>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuite name="" errors="0" failures="0" skips="0" tests="0" time="0.001" ></testsuite>