Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Ignoring files in .ocplint does not work when ocp-lint is run in a sub-directory #169

Open
david-maison opened this issue Apr 13, 2018 · 0 comments

Comments

@david-maison
Copy link

Let's take the following example:

$ tree -a
.
├── dir
│   ├── bar.ml
│   └── bar.mli
├── foo.ml
├── foo.mli
└── .ocplint

1 directory, 5 files

$ cat .ocplint
plugin_parsing = {
  get_features = {
    enabled = false
  }
}

plugin_parsetree = {
  pattern_guard = {
    ignore = [ "dir/bar.ml" ]
  }
}

We do not use the db in this case.

Then, we run:

$ ocp-lint
Scanning files in project "."...
Found '6' file(s)
Running analyses... 6 / 6
Mergin database...
== New Warnings ==
  * 0 file(s) were linted
  * 0 warning(s) were emitted:
  * 0 file(s) couldn't be linted

And then:

$ cd dir && ocp-lint
Scanning files in project "."...
Found '2' file(s)
Running analyses... 2 / 2
Mergin database...
== New Warnings ==
  * 1 file(s) were linted
  * 1 warning(s) were emitted:
      * 1 warning(s) raised by "plugin_parsetree"/"pattern_guard.1"/warning #1
  * 0 file(s) couldn't be linted

The configuration file is successfully read (because we do not have the "get_features" warnings), but I expected the file "bar.ml" to be ignored for the rule "pattern_guard". Is it normal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant