Skip to content

Allow the user to pass the path of .lintr to lint() #335

Closed

Description

@mattiaciollaro

Hey @jimhester, thanks again for this package!

I am trying to wrap lintr, together with linters for other languages, in another project.

Is it possible to manually pass the .lintr config file to lint() instead of having lint() look for it automatically in current_dir -> project_dir -> user_dir as implemented in the find_config function of the settings.R file?

I am currently trying to hack a temporary solution, because I think the answer to my question is not at the moment.
If it is in fact not possible to do so at the moment, do you think this could be made a feature?

I am thinking about the possibility of adding a config_file argument to lint() which, if not NULL, overrides the automatic search for the .lintr file (assuming that parse_settings = TRUE).

Activity

  1. jimhester commented on Jul 5, 2018

    @jimhester
    Member

    The config file location is looked up by the R option lintr.linter_file, so you could use that to change the location. But I agree it should probably just be an argument to lint().

  2. added
    feature
    on Jan 12, 2019
  3. jimhester commented on Sep 27, 2019

    @jimhester
    Member

    I think this was addressed with baddc5b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions