flaviostutz / monolint

Linter for monorepos. Checks folder structure, module contents, file contents and naming conventions
MIT License
7 stars 4 forks source link

module-same-contents: Add capability for Makefile target contents #45

Closed flaviostutz closed 1 year ago

flaviostutz commented 1 year ago

Describe the solution you'd like I would like to have the same capability for validating similar contents of json and yml files for makefile targets also

{
  "rules": {
    "module-same-contents": {
      "files": {
        "Makefile": {
          "selectors": [
            "lint",
            "test"
          ]
        }
      }
    }
  }
}

In this example it will check if the contents of targets "lint" and "test" of the Makefiles among repository modules are the same.

Describe alternatives you've considered none

Additional context In a monorepo that uses Makefiles some targets are common to various modules. For example, for linting, building and testing, probably we will use the same commands for npm based modules.