0

I have a project with arcanist setup along with phabricator for version control and code review management. There is a neat .arclint configuration setup currently using a mix of inbuilt linters (like filename) and external linters like cpplint, with setup for includes and excludes done.

What is the best way to get this linter setup to a bitbucket-based tool doing the same thing? Essentially, is there a way to know how arc lint converts a .arclint file configuration to a command line argument with specifications of including files and severity warnings?

I can use git to figure out a list of files changed, which is already part of arc lint, but I still want to understand what magic is arc lint running underneath to run the specific linter. And I know how bitbucket-pipelines work to run lint before every new merge.

Here is a part of .arclint which I am trying to replicate

   "linters": {
     "chmod": {
       "type": "chmod"
     },
     "filename": {
       "type": "filename"
     },
     "merge-conflict": {
       "type": "merge-conflict"
     },
     "json": {
       "type": "json",
       "include": [
         "(^\\.arcconfig$)",
         "(^\\.arclint$)",
         "(\\.json$)"
       ]
     },
     "nolint": {
       "type": "nolint"
     },
     "xml": {
       "type": "xml",
       "include": [
         "(\\.xml$)"
       ]
     },
     "cpplinth": {
       "type": "cpplint",
       "bin" : ["dev_tools/cpplint.py"],
       "include": [
         "(\\.h$)",
         "(\\.hpp$)"
       ],

  • Is there a reason why you don't want to setup it run in your pipeline? – Randommm Aug 08 '22 at 12:39
  • I would also want to be able to run linter locally on my commits, before creating a pull request, and I don't want to be dependent on arc lint for that since the arcanist is no longer in active development and we would like to move away from it. – Shashank Gangrade Aug 08 '22 at 13:05

0 Answers0