nokia / ntt

Modern tools for TTCN-3

Home Page:https://nokia.github.io/ntt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ntt lint: NOLINT directives are ignored

5nord opened this issue · comments

The ntt lint command ignores NOLINT directives for module definitions with a visibility.
For example:

module test {
	// NOLINT(CodeStatistics.TooComplex)
	private function foo() {
		if (1==1 or 2==2 or 3==3) { }
	}
}
EOT

$ cat >.ntt-lint.yml <<EOT
complexity:
     max: 1
EOT

$ ntt lint
test.ttcn3:3:10: error: cyclomatic complexity of "foo" (4) must not be higher than 1
1 issue found.

Current workaround is to attach the directive to the function declaration directly:

module test {
	private
	// NOLINT(CodeStatistics.TooComplex)
	function bar() {
		if (1==1 or 2==2 or 3==3) { }
	}
}

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days