summaryrefslogtreecommitdiffstats
path: root/tests/lint_tests/lint_tutil.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:05:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:05:28 +0000
commita4b65820a6d367018519b5acf4b450a103201ea3 (patch)
treee566fc8f1dc451faf91533d546b1c1622d67044a /tests/lint_tests/lint_tutil.py
parentAdding upstream version 0.1.29. (diff)
downloaddebputy-a4b65820a6d367018519b5acf4b450a103201ea3.tar.xz
debputy-a4b65820a6d367018519b5acf4b450a103201ea3.zip
Adding upstream version 0.1.30.upstream/0.1.30
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/lint_tests/lint_tutil.py')
-rw-r--r--tests/lint_tests/lint_tutil.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/lint_tests/lint_tutil.py b/tests/lint_tests/lint_tutil.py
index 83b69fd..8290712 100644
--- a/tests/lint_tests/lint_tutil.py
+++ b/tests/lint_tests/lint_tutil.py
@@ -9,6 +9,7 @@ from debputy.linting.lint_util import (
LintStateImpl,
LintState,
)
+from debputy.lsp.style_prefs import StylePreferenceTable, EffectivePreference
from debputy.packages import DctrlParser
from debputy.plugin.api.feature_set import PluginProvidedFeatureSet
@@ -43,6 +44,8 @@ class LintWrapper:
self.dctrl_lines: Optional[List[str]] = None
self.path = path
self._dctrl_parser = dctrl_parser
+ self.lint_style_preference_table = StylePreferenceTable({}, {})
+ self.effective_preference: Optional[EffectivePreference] = None
def __call__(self, lines: List[str]) -> Optional[List["Diagnostic"]]:
source_package = None
@@ -56,10 +59,13 @@ class LintWrapper:
)
state = LintStateImpl(
self._debputy_plugin_feature_set,
+ self.lint_style_preference_table,
self.path,
+ "".join(dctrl_lines) if dctrl_lines is not None else "",
lines,
source_package,
binary_packages,
+ self.effective_preference,
)
return check_diagnostics(self._handler(state))