Skip to content

Global config that does not define StylesPath results in error with FindAsset #1095

@StaticRocket

Description

@StaticRocket

Check for existing issues

  • Completed

Environment

  • Linux
  • Go (local build)
  • vale version v3.14.1

Describe the bug / provide steps to reproduce it

  1. Using a user global config ($HOME/.config/vale/.vale.ini) and a project local config ($PWD/.vale.ini)
  2. Define StylesPath in only the local configuration
  3. Attempt to load an external style with a custom dictionary (RedHat for example)
  4. The following error will be reported:
E201 Invalid value [.github/styles/RedHat/Spelling.yml:1:1]:

   1* ---
   2  extends: spelling
   3  level: warning

unable to resolve dicpath

Execution stopped with code 1.

FindAsset will be given the last cfg.Path in the list, which will not exist as it's a combination of the global config path with the local StylePath.

The way paths and configuration structures are handled right now is a little problematic. Paths should be expanded relative to the INI file before INI shadowing takes effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions