Problem matcher with hard-coded message

prettier --list-different lists only filenames without an actual error message, meaning there is nothing to match for message in a problem matcher.

It’d be great if GitHub Actions supported hard-coding a message instead of attempting to match one:

{
  "problemMatcher": [
    {
      "owner": "prettier",
"message": "Code style issue (have you run prettier?)",
      "pattern": [
        {
          "regexp": "^(.*)$",
          "file": 1
        }
      ]
    }
  ]
}
 
1 Like

@jackwilsdon ,

According to the docs about prettier CLI, it is designed that the –list-different flag only prints the filenames of files that are different from Prettier formatting.

Maybe you can try using the –check flag, it will output a human-friendly message and a list of unformatted files, if any.