Code lens¶
Informational lines above procedures: cognitive and cyclomatic complexity, test run and coverage.
Shortcut: automatic
CodeLens: method complexity¶
The cursor sits on a method declaration in a .bsl module, and a CodeLens line appears above it. The lens shows the method's metrics — cognitive and cyclomatic complexity.
CodeLens: navigate to bean definition (Autumn DI)¶
In a OneScript class, a «go to definition» lens is shown above the &Пластилин Autumn DI injection point and gets clicked. The editor navigates to the bean class (&Желудь) that provides the injected dependency.
CodeLens: bean usages (Autumn DI)¶
On a &Желудь bean class declaration (Autumn DI), a lens with the injection-points count is clicked. A peek window opens listing every place where this bean is injected.
CodeLens: run OneScript tests¶
Above the &Тест methods in a OneScript module, «Run test» and «Run all tests» lenses are shown, and one of them is clicked. A terminal opens and executes the test-runner command.
CodeLens: complexity counters on click¶
In .bsl code, the «Cognitive complexity» lens above a method is clicked. Inline complexity counters appear in the code: +1 on branches and +2 (nesting=1) on nested constructs.