More flexibility in indentation rules

The indentation rules (like java:S1120) take a single indentation parameter, and that’s that. This generates a lot of issues when scanning legacy projects, particularly those developed by multiple teams, because you’ll have one file consistently indented with 4 spaces, and another with 8. Each file is perfectly readable, but one of them will be out of compliance.

It would be nice if the rule could be configured to be more flexible in accepting such cases. Perhaps the most flexible configuration would be to act like Python, which, as far as I can tell, will accept anything as long as all lines at the same block level are indented equally, and a level is indented at least one space more than its parent. (I think Python even accepts having different indentations for parallel blocks, such as the sub-blocks of an if-then-else statement, as long as each block has uniform indentation. Optionally disallowing that might also be a nice feature.)

Another option might be to require uniform indentation throughout a file, but allow each file to have its own (determined by looking at the first indentation – so indenting by 8 instead of 4 is fine as long as the whole file is 8).