File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
finecode_builtin_handlers/src/finecode_builtin_handlers Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 99
1010
1111@dataclasses .dataclass
12- class LintHandlerConfig (code_action .ActionHandlerConfig ): ...
12+ class LintHandlerConfig (code_action .ActionHandlerConfig ):
13+ lint_opened_files_only_in_ide : bool = True
14+ """When True (default), background IDE lints triggered automatically only lint
15+ currently opened files for performance. Set to False to always lint the full project."""
1316
1417
1518class LintHandler (
@@ -19,10 +22,12 @@ class LintHandler(
1922):
2023 def __init__ (
2124 self ,
25+ config : LintHandlerConfig ,
2226 action_runner : iactionrunner .IActionRunner ,
2327 logger : ilogger .ILogger ,
2428 file_editor : ifileeditor .IFileEditor ,
2529 ) -> None :
30+ self .config = config
2631 self .action_runner = action_runner
2732 self .file_editor = file_editor
2833 self .logger = logger
@@ -37,7 +42,8 @@ async def run(
3742
3843 if payload .target == lint_action .LintTarget .PROJECT :
3944 if (
40- run_meta .dev_env == code_action .DevEnv .IDE
45+ self .config .lint_opened_files_only_in_ide
46+ and run_meta .dev_env == code_action .DevEnv .IDE
4147 and run_meta .trigger == code_action .RunActionTrigger .SYSTEM
4248 ):
4349 # Performance optimisation: when the IDE triggers a background project
You can’t perform that action at this time.
0 commit comments