Nested configurations

Hi guys. I have a question regarding configuration flexibility.

With the Swift lint we can put configuration into project subfolder and all files in this folder will take into account this clarified configuration, so we can create different rules for production code and for unitTests.

is this possible with Codacy? how to create such a configuration here?

1 Like

Hi @zgshnk !

Unfortunately, this is not something that Codacy supports right now. We can only use one set of rules for your whole repo and is not possible to have several sets of rules being used on different folders.

But there are some tricks that you can use to get to a similar behavior. If, for example, you want a tool running only on a sub-set of your repo you can use the Codacy configuration file to make that tool excludes the rest of your repo.

Another option is to run the full analysis on your repo and then ignore the issues that are not relevant for you.

Would any of those options work for you?



1 Like

Hi Ivo,

Thanks for your answer.

This solutions sounds not that dynamic and flexible as nested files in subfolders.
Too many actions for simple things as for me.
But we can discuss within team.

Coadacy, is this feature may appear in future?
at least as an option: “Use nested config files” or something like this.

What do you think?

Hi @zgshnk, thank you for getting back, and my apologies for the delay! We were wondering how was the team feedback in terms of those two solutions provided by Ivo?

We appreciate the feedback regarding nested config files, and to be honest with you, this is not something that is not a priority currently or something we have planned to have in the near future. We will add this feedback to our product board though, and we would also be keen to better understand/get further insights as to why this is a pressing need for you and your team, so we can feed this information to the product team, and see what they think.

Thank you!

Hi Amelia,

Thank you for your reply.

Provided solutions is too static and hard to maintain.
we have mocks, tests, factories, production code and demo code in project.
we want to be reasonable formal and flexible with the code quality, so swift lint nested configuration is really good way to manage it.

for example I’m adding a new DemoViewController, and I need to cover some edge cases in it and some of the lint rules going to be violated in it.
Create a new configuration for this or ignore globally some rules doesn’t looks like a convenient solution here.

1 Like