Remove arc scripts
authorÖmer Sinan Ağacan <omeragacan@gmail.com>
Sun, 17 Feb 2019 05:04:17 +0000 (08:04 +0300)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Tue, 19 Feb 2019 11:26:17 +0000 (06:26 -0500)
.arc-linters/arcanist-external-json-linter [deleted submodule]
.arc-linters/check-binaries.py [deleted file]
.arc-linters/check-cpp.py [deleted file]
.arc-linters/check-makefiles.py [deleted file]
.arcconfig [deleted file]
.arclint [deleted file]
.gitmodules

diff --git a/.arc-linters/arcanist-external-json-linter b/.arc-linters/arcanist-external-json-linter
deleted file mode 160000 (submodule)
index 957f9e4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 957f9e4e8eb422dcb72f02f07767a1ed5969baab
diff --git a/.arc-linters/check-binaries.py b/.arc-linters/check-binaries.py
deleted file mode 100755 (executable)
index 017b89b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python3
-
-# A linter to warn when binary files are added to the repository
-
-import sys
-import os
-import json
-
-path = sys.argv[1]
-warnings = []
-if os.path.isfile(path):
-    with open(path, 'rb') as f:
-        if b'\0' in f.read(8000):
-            warning = {
-                'severity': 'warning',
-                'message': 'This file appears to be a binary file; does it really belong in the repository?'
-            }
-            warnings.append(warning)
-
-print(json.dumps(warnings))
diff --git a/.arc-linters/check-cpp.py b/.arc-linters/check-cpp.py
deleted file mode 100755 (executable)
index a442e26..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/env python3
-
-# A linter to warn for ASSERT macros which are separated from their argument
-# list by a space, which Clang's CPP barfs on
-
-import sys
-import logging
-import os
-import re
-import json
-
-def setup_logging(logger):
-    """
-    ``arc lint`` makes it quite tricky to catch debug output from linters.
-    Log to a file to work around this.
-    """
-    hdlr = logging.FileHandler('linter.log', 'w')
-    logger.addHandler(hdlr)
-    logger.setLevel(logging.DEBUG)
-    return logger
-
-logger = logging.getLogger()
-#setup_logging(logger)
-logger.debug(sys.argv)
-
-def add_warning(severity, message, line):
-    entry = {
-        'severity': severity,
-        'message': message,
-        'line': line
-    }
-    warnings.append(entry)
-
-class Linter(object):
-    def __init__(self):
-        self.warnings = []
-
-    def add_warning(self, **entry):
-        self.warnings.append(entry)
-
-    def lint(self, path):
-        pass
-
-class LineLinter(Linter):
-    def lint(self, path):
-        if os.path.isfile(path):
-            with open(path, 'rb') as f:
-                for lineno, line in enumerate(f):
-                    self.lint_line(lineno+1, line)
-
-    def lint_line(self, lineno, line):
-        pass
-
-class RegexpLinter(LineLinter):
-    def __init__(self, regex, **warning):
-        LineLinter.__init__(self)
-        self.re = re.compile(regex)
-        self.warning = warning
-
-    def lint_line(self, lineno, line):
-        if self.re.search(line):
-            warning = {
-                'line': lineno,
-            }
-            warning.update(self.warning)
-            self.add_warning(**warning)
-
-linters = [
-    RegexpLinter(br'ASSERT\s+\(',
-                 message='CPP macros should not have a space between the macro name and their argument list'),
-    RegexpLinter(br'#ifdef\s+',
-                 message='`#if defined(x)` is preferred to `#ifdef x`',
-                 severity='warning'),
-    RegexpLinter(br'#if\s+defined\s+',
-                 message='`#if defined(x)` is preferred to `#if defined x`',
-                 severity='warning'),
-    RegexpLinter(br'#ifndef\s+',
-                 message='`#if !defined(x)` is preferred to `#ifndef x`',
-                 severity='warning'),
-]
-
-if __name__ == '__main__':
-    path = sys.argv[1]
-    for linter in linters:
-        linter.lint(path)
-
-    warnings = [warning
-                for linter in linters
-                for warning in linter.warnings]
-    logger.debug(warnings)
-    print(json.dumps(warnings))
diff --git a/.arc-linters/check-makefiles.py b/.arc-linters/check-makefiles.py
deleted file mode 100644 (file)
index 4778b2d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python3
-
-# Warn for use of `--interactive` inside Makefiles (#11468).
-#
-# Encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of
-# `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to
-# forget one of those flags when adding a new test.
-
-import sys
-import os
-import json
-import re
-
-path = sys.argv[1]
-warnings = []
-if os.path.isfile(path):
-    with open(path) as f:
-        for lineno, line in enumerate(f):
-            if '--interactive' in line:
-                warning = {
-                    'severity': 'warning',
-                    'message': 'Use `$(TEST_HC_OPTS_INTERACTIVE)` instead of `--interactive -ignore-dot-ghci -v0`',
-                    'line': lineno+1,
-                }
-                warnings.append(warning)
-
-print(json.dumps(warnings))
diff --git a/.arcconfig b/.arcconfig
deleted file mode 100644 (file)
index 29021b3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "project.name"        : "ghc",
-  "repository.callsign" : "GHC",
-  "phabricator.uri"     : "https://phabricator.haskell.org",
-  "base"                : "git:merge-base(origin/master), arc:prompt",
-
-  "load": [
-    ".arc-linters/arcanist-external-json-linter"
-  ]
-}
diff --git a/.arclint b/.arclint
deleted file mode 100644 (file)
index 95355e2..0000000
--- a/.arclint
+++ /dev/null
@@ -1,125 +0,0 @@
-{
-  "linters": {
-    "filename": {
-      "type": "filename"
-    },
-    "generated": {
-      "type": "generated"
-    },
-    "merge-conflict": {
-      "type": "merge-conflict",
-      "exclude": "(\\.rst$)"
-    },
-    "nolint": {
-      "type": "nolint"
-    },
-    "haskell": {
-      "type": "text",
-      "include": ["(\\.(l?hs(-boot)?|x|y\\.pp)(\\.in)?$)"],
-      "severity": {
-        "5": "disabled",
-        "2": "warning"
-      }
-    },
-    "c": {
-      "type": "text",
-      "include": ["(\\.(c|h)(\\.in)?$)"],
-      "severity": {
-        "2": "warning"
-      }
-    },
-    "text-xml": {
-      "type": "text",
-      "include": "(\\.xml$)",
-      "severity": {
-        "5": "disabled",
-        "3": "disabled",
-        "2": "warning"
-      }
-    },
-    "shell": {
-      "type": "text",
-      "include": [ "(\\.sh$)" ],
-      "text.max-line-length": 200,
-      "severity": {
-        "2": "warning"
-      }
-    },
-    "makefiles": {
-      "type": "text",
-      "include": [ "(Makefile$)", "(\\.mk$)" ],
-      "text.max-line-length": 400,
-      "severity": {
-        "2": "disabled"
-      }
-    },
-    "cabal": {
-      "type": "text",
-      "include": ["(\\.cabal(\\.in)?$)"],
-      "severity": {
-        "5": "disabled",
-        "2": "warning"
-      }
-    },
-    "other-text": {
-      "type": "text",
-      "include": ["(.travis.yml?)", "(.md$)", "(.txt$)"],
-      "severity": {
-        "5": "disabled",
-        "2": "warning"
-      }
-    },
-    "check-binaries": {
-      "type": "external-json",
-      "external-json.script": "python3 .arc-linters/check-binaries.py"
-    },
-    "check-makefiles": {
-      "type": "external-json",
-      "include": ["(Makefile$)"],
-      "external-json.script": "python3 .arc-linters/check-makefiles.py"
-    },
-    "bad-assert-clang-cpp": {
-      "type": "external-json",
-      "include": ["(\\.(l?hs|x|y\\.pp)(\\.in)?$)", "(\\.(c|h)$)"],
-      "external-json.script": "python3 .arc-linters/check-cpp.py"
-    }
-  },
-
-  "exclude":
-    [ "(^libffi-tarballs)",
-      "(^libraries/binary)",
-      "(^libraries/bytestring)",
-      "(^libraries/Cabal)",
-      "(^libraries/containers)",
-      "(^libraries/haskeline)",
-      "(^libraries/pretty)",
-      "(^libraries/terminfo)",
-      "(^libraries/transformers)",
-      "(^libraries/xhtml)",
-      "(^libraries/Win32)",
-      "(^libraries/primitive)",
-      "(^libraries/vector)",
-      "(^libraries/time)",
-      "(^libraries/random)",
-      "(^libraries/array)",
-      "(^libraries/deepseq)",
-      "(^libraries/directory)",
-      "(^libraries/filepath)",
-      "(^libraries/haskell98)",
-      "(^libraries/haskell2010)",
-      "(^libraries/hoopl)",
-      "(^libraries/hpc)",
-      "(^libraries/old-locale)",
-      "(^libraries/old-time)",
-      "(^libraries/process)",
-      "(^libraries/unix)",
-      "(^libraries/parallel)",
-      "(^libraries/stm)",
-      "(^libraries/dph)",
-      "(^utils/haddock)",
-      "(^nofib)",
-      "(^utils/hsc2hs)",
-      "(^libffi-tarballs)",
-      "(^ghc-tarballs)"
-    ]
-}
index 5700a96..4de91b6 100644 (file)
 [submodule "gmp-tarballs"]
        path = libraries/integer-gmp/gmp/gmp-tarballs
        url = ../gmp-tarballs.git
-[submodule ".arc-linters/arcanist-external-json-linter"]
-       path = .arc-linters/arcanist-external-json-linter
-       url = ../arcanist-external-json-linter.git