Skip to content

Commit 8140f46

Browse files
committed
Switch PROJECT_CONFIG.source with PROJECT_CONFIG.source_code_path
1 parent 8845fa9 commit 8140f46

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

doc/user_guide/features/metrics/sonar.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,5 @@ project from Sonar's analysis:
130130
See the `Sonar Matching Patterns`_ for more details.
131131

132132
By default, the nox session ``sonar:check`` only analyses the source code,
133-
as specified by the ``PROJECT_CONFIG.source``, so directories outside of this
133+
as specified by the ``PROJECT_CONFIG.source_code_path``, so directories outside of this
134134
are already excluded from being analyzed.

exasol/toolbox/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ def excluded_python_paths(self) -> tuple[str, ...]:
106106
- lint:security
107107
- lint:typing
108108
where it is desired to restrict which Python files are considered within the
109-
PROJECT_CONFIG.source path, like excluding `dist`, `.eggs`. As such, this
110-
property is used to exclude such undesired paths.
109+
PROJECT_CONFIG.source_code_path path, like excluding `dist`, `.eggs`. As such,
110+
this property is used to exclude such undesired paths.
111111
"""
112112
return tuple(
113113
DEFAULT_EXCLUDED_PATHS.union(set(self.add_to_excluded_python_paths))

exasol/toolbox/nox/_artifacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,5 +247,5 @@ def _upload_to_sonar(session: Session, sonar_token: str | None, config: Config)
247247
def upload_artifacts_to_sonar(session: Session) -> None:
248248
"""Upload artifacts to sonar for analysis"""
249249
sonar_token = os.getenv("SONAR_TOKEN")
250-
_prepare_coverage_xml(session, PROJECT_CONFIG.source)
250+
_prepare_coverage_xml(session, PROJECT_CONFIG.source_code_path)
251251
_upload_to_sonar(session, sonar_token, PROJECT_CONFIG)

exasol/toolbox/nox/_lint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def report_illegal(illegal: dict[str, list[str]], console: rich.console.Console)
123123
@nox.session(name="lint:code", python=False)
124124
def lint(session: Session) -> None:
125125
"""Runs the static code analyzer on the project"""
126-
py_files = get_filtered_python_files(PROJECT_CONFIG.root / PROJECT_CONFIG.source)
126+
py_files = get_filtered_python_files(PROJECT_CONFIG.source_code_path)
127127
_pylint(session=session, files=py_files)
128128

129129

@@ -137,7 +137,7 @@ def type_check(session: Session) -> None:
137137
@nox.session(name="lint:security", python=False)
138138
def security_lint(session: Session) -> None:
139139
"""Runs the security linter on the project"""
140-
py_files = get_filtered_python_files(PROJECT_CONFIG.root / PROJECT_CONFIG.source)
140+
py_files = get_filtered_python_files(PROJECT_CONFIG.source_code_path)
141141
_security_lint(session=session, files=py_files)
142142

143143

noxconfig.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class Config(BaseConfig):
5252
"""Project specific configuration used by nox infrastructure"""
5353

5454
root: Path = Path(__file__).parent
55-
source: Path = Path("exasol/toolbox")
5655
importlinter: Path = Path(__file__).parent / ".import_linter_config"
5756
version_file: Path = Path(__file__).parent / "exasol" / "toolbox" / "version.py"
5857
plugins: Iterable[object] = (UpdateTemplates,)

0 commit comments

Comments
 (0)