Allow to use absolute path for --profile option

Issue #60 new
Vladislav Vinogradov created an issue

Currently --profile option accepts only profile name and the profile file should be located in the root directory alongside with scripts.

But sometimes it will be useful to separate profile from scripts. For example, some project can use default rules, which are installed to /usr/lib/vera++/scripts, and use own profile, which is located in project source directory. For such scenario, vera++ can be used as:

/usr/bin/vera++ --root /usr/lib/vera++ --profile <path to the project>/custom_profile.tsl <files>

Comments (8)

  1. Gaëtan Lehmann

    I guess we can look in the root directory when the profile has no / in it an use it as a path when it has one or more '/'

  2. Jason Sachs

    Please raise priority on this one. I want to use the regular rule definitions but a custom profile in the current directory.

  3. Paulo Facó

    Another advantage would be for tranfering projects between machines, the vera++ rules used would always be sent together. +1 to this.

  4. Loki Astari

    I don't quite understand how the assignment processes works. But I have looked at the code and adding this feature looks relatively simple.

    So I could volunteer to do this.

  5. Loki Astari

    I would also like this feature. Because I want to keep the profile I use checked in and local to my project (not local to vera++). Currently this is not supported.

  6. Former user Account Deleted

    This would help with continuous integration. Having to first copy the profile to the correct folder is a bit of a pain.

  7. edusrpo

    +1 Like many other programs I followed the duck test principle expecting --profile will overlay my current directory to the ones on the installation so I can maintain project specific profile (or maybe even rules) in my project. I found that vera was not finding the files so my options to integrate this into my CI are: - Create a clone copy of all vera rules in my project - Move every build the profile to the proper location (that I didn't found yet after a regular apt install) The problem with this approach is that I don't in advance the location of vera on my build agents (they could be any Linux distribution)

  8. Log in to comment