vale icon indicating copy to clipboard operation
vale copied to clipboard

Title case rules error out when everything is already capitalized

Open kayx23 opened this issue 2 years ago • 4 comments

Check for existing issues

  • [X] Completed

Description

Rule:

extends: capitalization
message: "'%s' should be in title case"
level: error
scope: heading.md
match: $title
style: AP # AP or Chicago; only applies when match is set to $title.
exceptions:
  - gRPC

Github Action:

name: reviewdog
on: [pull_request]

jobs:
  vale:
    runs-on: ubuntu-latest
    steps:
      ..........
      - name: reviewdog
        uses: errata-ai/vale-action@reviewdog
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
        with:
          separator: ","
          files: ${{ steps.files.outputs.added_modified }}
          reporter: github-check
          fail_on_error: true

I've not changed the configuration or github action for a few months and the rule was working as intended. These few days I've been noticing exceptions such as:

image

image

As you can see they're already in title case and Vale should not report an error.

What could have changed recently? Appreciate any pointer.

kayx23 avatar Oct 21 '23 03:10 kayx23

This issue is reproducible in v2.29.6. I rolled my github action back to use v2.29.4 and the issue is gone, so it's probably a bug.

kayx23 avatar Oct 21 '23 18:10 kayx23

This bug is also present in the repositories I manage.

meaghanfitzgerald avatar Nov 14 '23 21:11 meaghanfitzgerald

My guess is that this https://github.com/errata-ai/vale/issues/706#issuecomment-1771748870 will resolved your problems.

jdkato avatar Nov 17 '23 02:11 jdkato

@jdkato Sorry I don't quite get the suggestion here, could you elaborate?

So in the above screenshot I had a title Define Multiple Matching Rules which was already in the title case. None of these words are in my accept.txt and I can't think of any other rule that might affect it.

kayx23 avatar Nov 17 '23 02:11 kayx23

The idea is that one of the case-sensitive entries in your accept.txt is matching a word in the heading. See if disabling your vocabularies makes the error go away.

@meaghanfitzgerald, I'm nearly certain that this is the issue in your case (based on this file). If you follow the instructions in https://github.com/errata-ai/vale/issues/706#issuecomment-1771748870 (only one entry per term), the issue will go away.

jdkato avatar Mar 01 '24 09:03 jdkato