lintro 0.5.2__py3-none-any.whl → 0.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lintro might be problematic. Click here for more details.
- lintro/__init__.py +1 -1
- lintro/formatters/tools/actionlint_formatter.py +1 -1
- lintro/formatters/tools/bandit_formatter.py +1 -1
- lintro/formatters/tools/black_formatter.py +48 -0
- lintro/formatters/tools/darglint_formatter.py +3 -1
- lintro/parsers/black/black_issue.py +22 -0
- lintro/parsers/black/black_parser.py +90 -0
- lintro/parsers/darglint/darglint_parser.py +1 -1
- lintro/parsers/hadolint/hadolint_parser.py +2 -2
- lintro/parsers/ruff/ruff_parser.py +87 -36
- lintro/parsers/yamllint/yamllint_parser.py +2 -2
- lintro/tools/__init__.py +2 -2
- lintro/tools/core/tool_base.py +41 -11
- lintro/tools/implementations/tool_bandit.py +4 -2
- lintro/tools/implementations/tool_black.py +261 -0
- lintro/tools/implementations/tool_prettier.py +1 -1
- lintro/tools/implementations/tool_ruff.py +47 -25
- lintro/tools/tool_enum.py +2 -0
- lintro/utils/ascii_normalize_cli.py +3 -1
- lintro/utils/config.py +16 -0
- lintro/utils/console_logger.py +59 -11
- lintro/utils/output_manager.py +2 -2
- lintro/utils/tool_executor.py +214 -7
- lintro/utils/tool_utils.py +12 -1
- {lintro-0.5.2.dist-info → lintro-0.6.0.dist-info}/METADATA +12 -10
- {lintro-0.5.2.dist-info → lintro-0.6.0.dist-info}/RECORD +30 -26
- {lintro-0.5.2.dist-info → lintro-0.6.0.dist-info}/WHEEL +0 -0
- {lintro-0.5.2.dist-info → lintro-0.6.0.dist-info}/entry_points.txt +0 -0
- {lintro-0.5.2.dist-info → lintro-0.6.0.dist-info}/licenses/LICENSE +0 -0
- {lintro-0.5.2.dist-info → lintro-0.6.0.dist-info}/top_level.txt +0 -0
lintro/utils/tool_executor.py
CHANGED
|
@@ -11,7 +11,7 @@ from lintro.enums.group_by import GroupBy, normalize_group_by
|
|
|
11
11
|
from lintro.enums.output_format import OutputFormat, normalize_output_format
|
|
12
12
|
from lintro.tools import tool_manager
|
|
13
13
|
from lintro.tools.tool_enum import ToolEnum
|
|
14
|
-
from lintro.utils.config import load_lintro_tool_config
|
|
14
|
+
from lintro.utils.config import load_lintro_tool_config, load_post_checks_config
|
|
15
15
|
from lintro.utils.console_logger import create_logger
|
|
16
16
|
from lintro.utils.output_manager import OutputManager
|
|
17
17
|
from lintro.utils.tool_utils import format_tool_output
|
|
@@ -227,6 +227,29 @@ def run_lint_tools_simple(
|
|
|
227
227
|
# Parse tool options
|
|
228
228
|
tool_option_dict = _parse_tool_options(tool_options)
|
|
229
229
|
|
|
230
|
+
# Load post-checks config early to exclude those tools from main phase
|
|
231
|
+
post_cfg_early = load_post_checks_config()
|
|
232
|
+
post_enabled_early = bool(post_cfg_early.get("enabled", False))
|
|
233
|
+
post_tools_early: set[str] = (
|
|
234
|
+
set(t.lower() for t in (post_cfg_early.get("tools", []) or []))
|
|
235
|
+
if post_enabled_early
|
|
236
|
+
else set()
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
if post_tools_early:
|
|
240
|
+
tools_to_run = [
|
|
241
|
+
t for t in tools_to_run if t.name.lower() not in post_tools_early
|
|
242
|
+
]
|
|
243
|
+
|
|
244
|
+
# If early post-check filtering removed all tools from the main phase,
|
|
245
|
+
# return a failure to signal that nothing was executed in the main run.
|
|
246
|
+
if not tools_to_run:
|
|
247
|
+
logger.warning(
|
|
248
|
+
"All selected tools were filtered out by post-check configuration",
|
|
249
|
+
)
|
|
250
|
+
logger.save_console_log()
|
|
251
|
+
return DEFAULT_EXIT_CODE_FAILURE
|
|
252
|
+
|
|
230
253
|
# Print main header (skip for JSON mode)
|
|
231
254
|
tools_list: str = ", ".join(t.name.lower() for t in tools_to_run)
|
|
232
255
|
if not json_output_mode:
|
|
@@ -252,8 +275,23 @@ def run_lint_tools_simple(
|
|
|
252
275
|
|
|
253
276
|
# Run each tool with rich formatting
|
|
254
277
|
for tool_enum in tools_to_run:
|
|
255
|
-
tool = tool_manager.get_tool(tool_enum)
|
|
256
278
|
tool_name: str = tool_enum.name.lower()
|
|
279
|
+
# Resolve the tool instance; if unavailable, record failure and continue
|
|
280
|
+
try:
|
|
281
|
+
tool = tool_manager.get_tool(tool_enum)
|
|
282
|
+
except Exception as e:
|
|
283
|
+
logger.warning(f"Tool '{tool_name}' unavailable: {e}")
|
|
284
|
+
from lintro.models.core.tool_result import ToolResult
|
|
285
|
+
|
|
286
|
+
all_results.append(
|
|
287
|
+
ToolResult(
|
|
288
|
+
name=tool_name,
|
|
289
|
+
success=False,
|
|
290
|
+
output=str(e),
|
|
291
|
+
issues_count=0,
|
|
292
|
+
),
|
|
293
|
+
)
|
|
294
|
+
continue
|
|
257
295
|
|
|
258
296
|
# Print rich tool header (skip for JSON mode)
|
|
259
297
|
if not json_output_mode:
|
|
@@ -281,6 +319,27 @@ def run_lint_tools_simple(
|
|
|
281
319
|
|
|
282
320
|
tool.set_options(include_venv=include_venv)
|
|
283
321
|
|
|
322
|
+
# If Black is configured as a post-check, avoid double formatting by
|
|
323
|
+
# disabling Ruff's formatting stages unless explicitly overridden via
|
|
324
|
+
# CLI or config. This keeps Ruff focused on lint fixes while Black
|
|
325
|
+
# handles formatting.
|
|
326
|
+
if "black" in post_tools_early and tool_name == "ruff":
|
|
327
|
+
# Respect explicit overrides from CLI or config
|
|
328
|
+
cli_overrides = tool_option_dict.get("ruff", {})
|
|
329
|
+
cfg_overrides = cfg or {}
|
|
330
|
+
if action == "fmt":
|
|
331
|
+
if (
|
|
332
|
+
"format" not in cli_overrides
|
|
333
|
+
and "format" not in cfg_overrides
|
|
334
|
+
):
|
|
335
|
+
tool.set_options(format=False)
|
|
336
|
+
else: # check
|
|
337
|
+
if (
|
|
338
|
+
"format_check" not in cli_overrides
|
|
339
|
+
and "format_check" not in cfg_overrides
|
|
340
|
+
):
|
|
341
|
+
tool.set_options(format_check=False)
|
|
342
|
+
|
|
284
343
|
# Run the tool
|
|
285
344
|
logger.debug(f"Executing {tool_name}")
|
|
286
345
|
|
|
@@ -353,18 +412,162 @@ def run_lint_tools_simple(
|
|
|
353
412
|
# Pull standardized counts again for debug log
|
|
354
413
|
fixed_dbg = getattr(result, "fixed_issues_count", fixed_count)
|
|
355
414
|
remaining_dbg = getattr(
|
|
356
|
-
result,
|
|
415
|
+
result,
|
|
416
|
+
"remaining_issues_count",
|
|
417
|
+
issues_count,
|
|
357
418
|
)
|
|
358
419
|
logger.debug(
|
|
359
420
|
f"Completed {tool_name}: {fixed_dbg} fixed, "
|
|
360
|
-
f"{remaining_dbg} remaining"
|
|
421
|
+
f"{remaining_dbg} remaining",
|
|
361
422
|
)
|
|
362
423
|
else:
|
|
363
424
|
logger.debug(f"Completed {tool_name}: {issues_count} issues found")
|
|
364
425
|
|
|
365
426
|
except Exception as e:
|
|
366
427
|
logger.error(f"Error running {tool_name}: {e}")
|
|
367
|
-
|
|
428
|
+
# Record a failure result and continue so that structured output
|
|
429
|
+
# (e.g., JSON) is still produced even if a tool cannot be
|
|
430
|
+
# resolved or executed. This keeps behavior consistent with tests
|
|
431
|
+
# that validate JSON output presence independent of exit codes.
|
|
432
|
+
from lintro.models.core.tool_result import ToolResult
|
|
433
|
+
|
|
434
|
+
all_results.append(
|
|
435
|
+
ToolResult(
|
|
436
|
+
name=tool_name,
|
|
437
|
+
success=False,
|
|
438
|
+
output=str(e),
|
|
439
|
+
issues_count=0,
|
|
440
|
+
),
|
|
441
|
+
)
|
|
442
|
+
# Continue to next tool rather than aborting the entire run
|
|
443
|
+
continue
|
|
444
|
+
|
|
445
|
+
# Optionally run post-checks (explicit, after main tools)
|
|
446
|
+
post_cfg = post_cfg_early or load_post_checks_config()
|
|
447
|
+
post_enabled = bool(post_cfg.get("enabled", False))
|
|
448
|
+
post_tools: list[str] = list(post_cfg.get("tools", [])) if post_enabled else []
|
|
449
|
+
enforce_failure: bool = bool(post_cfg.get("enforce_failure", action == "check"))
|
|
450
|
+
|
|
451
|
+
# In JSON mode, we still need exit-code enforcement even if we skip
|
|
452
|
+
# rendering post-check outputs. If a post-check tool is unavailable
|
|
453
|
+
# and enforce_failure is enabled during check, append a failure result
|
|
454
|
+
# so summaries and exit codes reflect the condition.
|
|
455
|
+
if post_tools and json_output_mode and action == "check" and enforce_failure:
|
|
456
|
+
for post_tool_name in post_tools:
|
|
457
|
+
try:
|
|
458
|
+
tool_enum = ToolEnum[post_tool_name.upper()]
|
|
459
|
+
# Ensure tool can be resolved; we don't execute it in JSON mode
|
|
460
|
+
_ = tool_manager.get_tool(tool_enum)
|
|
461
|
+
except Exception as e:
|
|
462
|
+
from lintro.models.core.tool_result import ToolResult
|
|
463
|
+
|
|
464
|
+
all_results.append(
|
|
465
|
+
ToolResult(
|
|
466
|
+
name=post_tool_name,
|
|
467
|
+
success=False,
|
|
468
|
+
output=str(e),
|
|
469
|
+
issues_count=1,
|
|
470
|
+
),
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
if post_tools and not json_output_mode:
|
|
474
|
+
# Print a clear post-checks section header
|
|
475
|
+
logger.print_post_checks_header(action=action)
|
|
476
|
+
|
|
477
|
+
for post_tool_name in post_tools:
|
|
478
|
+
try:
|
|
479
|
+
tool_enum = ToolEnum[post_tool_name.upper()]
|
|
480
|
+
except KeyError:
|
|
481
|
+
logger.warning(f"Unknown post-check tool: {post_tool_name}")
|
|
482
|
+
continue
|
|
483
|
+
|
|
484
|
+
# If the tool isn't available in the current environment (e.g., unit
|
|
485
|
+
# tests that stub a limited set of tools), skip without enforcing
|
|
486
|
+
# failure. Post-checks are optional when the tool cannot be resolved
|
|
487
|
+
# from the tool manager.
|
|
488
|
+
try:
|
|
489
|
+
tool = tool_manager.get_tool(tool_enum)
|
|
490
|
+
except Exception as e:
|
|
491
|
+
logger.warning(
|
|
492
|
+
f"Post-check '{post_tool_name}' unavailable: {e}",
|
|
493
|
+
)
|
|
494
|
+
continue
|
|
495
|
+
tool_name = tool_enum.name.lower()
|
|
496
|
+
|
|
497
|
+
# Post-checks run with explicit headers (reuse standard header)
|
|
498
|
+
if not json_output_mode:
|
|
499
|
+
logger.print_tool_header(tool_name=tool_name, action=action)
|
|
500
|
+
|
|
501
|
+
try:
|
|
502
|
+
# Load tool-specific config and common options
|
|
503
|
+
cfg: dict = load_lintro_tool_config(tool_name)
|
|
504
|
+
if cfg:
|
|
505
|
+
try:
|
|
506
|
+
tool.set_options(**cfg)
|
|
507
|
+
except Exception as e:
|
|
508
|
+
logger.debug(
|
|
509
|
+
f"Ignoring invalid config for {tool_name}: {e}",
|
|
510
|
+
)
|
|
511
|
+
tool.set_options(include_venv=include_venv)
|
|
512
|
+
if exclude:
|
|
513
|
+
exclude_patterns: list[str] = [
|
|
514
|
+
p.strip() for p in exclude.split(",")
|
|
515
|
+
]
|
|
516
|
+
tool.set_options(exclude_patterns=exclude_patterns)
|
|
517
|
+
|
|
518
|
+
# For check: Black should run in check mode; for fmt: run fix
|
|
519
|
+
if action == "fmt" and tool.can_fix:
|
|
520
|
+
result = tool.fix(paths=paths)
|
|
521
|
+
issues_count = getattr(result, "issues_count", 0)
|
|
522
|
+
total_fixed += getattr(result, "fixed_issues_count", 0) or 0
|
|
523
|
+
total_remaining += (
|
|
524
|
+
getattr(result, "remaining_issues_count", issues_count) or 0
|
|
525
|
+
)
|
|
526
|
+
else:
|
|
527
|
+
result = tool.check(paths=paths)
|
|
528
|
+
issues_count = getattr(result, "issues_count", 0)
|
|
529
|
+
total_issues += issues_count
|
|
530
|
+
|
|
531
|
+
# Format and display output
|
|
532
|
+
output = getattr(result, "output", None)
|
|
533
|
+
issues = getattr(result, "issues", None)
|
|
534
|
+
formatted_output: str = ""
|
|
535
|
+
if (output and output.strip()) or issues:
|
|
536
|
+
formatted_output = format_tool_output(
|
|
537
|
+
tool_name=tool_name,
|
|
538
|
+
output=output or "",
|
|
539
|
+
group_by=group_by_enum.value,
|
|
540
|
+
output_format=output_fmt_enum.value,
|
|
541
|
+
issues=issues,
|
|
542
|
+
)
|
|
543
|
+
|
|
544
|
+
if not json_output_mode:
|
|
545
|
+
logger.print_tool_result(
|
|
546
|
+
tool_name=tool_name,
|
|
547
|
+
output=(output if raw_output else formatted_output),
|
|
548
|
+
issues_count=issues_count,
|
|
549
|
+
raw_output_for_meta=output,
|
|
550
|
+
action=action,
|
|
551
|
+
success=getattr(result, "success", None),
|
|
552
|
+
)
|
|
553
|
+
|
|
554
|
+
all_results.append(result)
|
|
555
|
+
except Exception as e:
|
|
556
|
+
# Do not crash the entire run due to missing optional post-check
|
|
557
|
+
# tool
|
|
558
|
+
logger.warning(f"Post-check '{post_tool_name}' failed: {e}")
|
|
559
|
+
# Only enforce failure when the tool was available and executed
|
|
560
|
+
if enforce_failure and action == "check":
|
|
561
|
+
from lintro.models.core.tool_result import ToolResult
|
|
562
|
+
|
|
563
|
+
all_results.append(
|
|
564
|
+
ToolResult(
|
|
565
|
+
name=post_tool_name,
|
|
566
|
+
success=False,
|
|
567
|
+
output=str(e),
|
|
568
|
+
issues_count=1,
|
|
569
|
+
),
|
|
570
|
+
)
|
|
368
571
|
|
|
369
572
|
# Handle output based on format
|
|
370
573
|
if json_output_mode:
|
|
@@ -403,11 +606,15 @@ def run_lint_tools_simple(
|
|
|
403
606
|
"issues_count": getattr(result, "issues_count", 0),
|
|
404
607
|
"output": getattr(result, "output", ""),
|
|
405
608
|
"initial_issues_count": getattr(
|
|
406
|
-
result,
|
|
609
|
+
result,
|
|
610
|
+
"initial_issues_count",
|
|
611
|
+
None,
|
|
407
612
|
),
|
|
408
613
|
"fixed_issues_count": getattr(result, "fixed_issues_count", None),
|
|
409
614
|
"remaining_issues_count": getattr(
|
|
410
|
-
result,
|
|
615
|
+
result,
|
|
616
|
+
"remaining_issues_count",
|
|
617
|
+
None,
|
|
411
618
|
),
|
|
412
619
|
}
|
|
413
620
|
json_data["results"].append(result_data)
|
lintro/utils/tool_utils.py
CHANGED
|
@@ -19,6 +19,10 @@ from lintro.formatters.tools.bandit_formatter import (
|
|
|
19
19
|
BanditTableDescriptor,
|
|
20
20
|
format_bandit_issues,
|
|
21
21
|
)
|
|
22
|
+
from lintro.formatters.tools.black_formatter import (
|
|
23
|
+
BlackTableDescriptor,
|
|
24
|
+
format_black_issues,
|
|
25
|
+
)
|
|
22
26
|
from lintro.formatters.tools.darglint_formatter import (
|
|
23
27
|
DarglintTableDescriptor,
|
|
24
28
|
format_darglint_issues,
|
|
@@ -40,6 +44,8 @@ from lintro.formatters.tools.yamllint_formatter import (
|
|
|
40
44
|
format_yamllint_issues,
|
|
41
45
|
)
|
|
42
46
|
from lintro.parsers.bandit.bandit_parser import parse_bandit_output
|
|
47
|
+
from lintro.parsers.black.black_issue import BlackIssue
|
|
48
|
+
from lintro.parsers.black.black_parser import parse_black_output
|
|
43
49
|
from lintro.parsers.darglint.darglint_parser import parse_darglint_output
|
|
44
50
|
from lintro.parsers.hadolint.hadolint_parser import parse_hadolint_output
|
|
45
51
|
from lintro.parsers.prettier.prettier_issue import PrettierIssue
|
|
@@ -52,6 +58,7 @@ from lintro.parsers.yamllint.yamllint_parser import parse_yamllint_output
|
|
|
52
58
|
TOOL_TABLE_FORMATTERS: dict[str, tuple] = {
|
|
53
59
|
"darglint": (DarglintTableDescriptor(), format_darglint_issues),
|
|
54
60
|
"hadolint": (HadolintTableDescriptor(), format_hadolint_issues),
|
|
61
|
+
"black": (BlackTableDescriptor(), format_black_issues),
|
|
55
62
|
"prettier": (PrettierTableDescriptor(), format_prettier_issues),
|
|
56
63
|
"ruff": (RuffTableDescriptor(), format_ruff_issues),
|
|
57
64
|
"yamllint": (YamllintTableDescriptor(), format_yamllint_issues),
|
|
@@ -301,6 +308,8 @@ def format_tool_output(
|
|
|
301
308
|
)
|
|
302
309
|
if tool == "prettier":
|
|
303
310
|
return lambda i: isinstance(i, PrettierIssue) or True
|
|
311
|
+
if tool == "black":
|
|
312
|
+
return lambda i: isinstance(i, BlackIssue) or True
|
|
304
313
|
return None
|
|
305
314
|
|
|
306
315
|
is_fixable = _is_fixable_predicate(tool_name)
|
|
@@ -354,6 +363,8 @@ def format_tool_output(
|
|
|
354
363
|
parsed_issues = parse_ruff_output(output=output)
|
|
355
364
|
elif tool_name == "prettier":
|
|
356
365
|
parsed_issues = parse_prettier_output(output=output)
|
|
366
|
+
elif tool_name == "black":
|
|
367
|
+
parsed_issues = parse_black_output(output=output)
|
|
357
368
|
elif tool_name == "darglint":
|
|
358
369
|
parsed_issues = parse_darglint_output(output=output)
|
|
359
370
|
elif tool_name == "hadolint":
|
|
@@ -364,7 +375,7 @@ def format_tool_output(
|
|
|
364
375
|
# Bandit emits JSON; try parsing when raw output is provided
|
|
365
376
|
try:
|
|
366
377
|
parsed_issues = parse_bandit_output(
|
|
367
|
-
bandit_data=__import__("json").loads(output)
|
|
378
|
+
bandit_data=__import__("json").loads(output),
|
|
368
379
|
)
|
|
369
380
|
except Exception:
|
|
370
381
|
parsed_issues = []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lintro
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: A unified CLI tool for code formatting, linting, and quality assurance
|
|
5
5
|
Author-email: TurboCoder13 <turbocoder13@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -49,9 +49,9 @@ Requires-Dist: httpx==0.28.1
|
|
|
49
49
|
Requires-Dist: toml==0.10.2
|
|
50
50
|
Requires-Dist: defusedxml==0.7.1
|
|
51
51
|
Provides-Extra: dev
|
|
52
|
-
Requires-Dist: pytest==8.4.
|
|
52
|
+
Requires-Dist: pytest==8.4.2; extra == "dev"
|
|
53
53
|
Requires-Dist: pytest-cov==6.2.1; extra == "dev"
|
|
54
|
-
Requires-Dist: pytest-mock==3.
|
|
54
|
+
Requires-Dist: pytest-mock==3.15.0; extra == "dev"
|
|
55
55
|
Requires-Dist: pytest-xdist==3.8.0; extra == "dev"
|
|
56
56
|
Requires-Dist: tox==4.30.1; extra == "dev"
|
|
57
57
|
Requires-Dist: allure-pytest==2.15.0; extra == "dev"
|
|
@@ -62,9 +62,9 @@ Requires-Dist: python-semantic-release==10.3.1; extra == "dev"
|
|
|
62
62
|
Requires-Dist: assertpy==1.1; extra == "dev"
|
|
63
63
|
Requires-Dist: httpx==0.28.1; extra == "dev"
|
|
64
64
|
Provides-Extra: test
|
|
65
|
-
Requires-Dist: pytest==8.4.
|
|
65
|
+
Requires-Dist: pytest==8.4.2; extra == "test"
|
|
66
66
|
Requires-Dist: pytest-cov==6.2.1; extra == "test"
|
|
67
|
-
Requires-Dist: pytest-mock==3.
|
|
67
|
+
Requires-Dist: pytest-mock==3.15.0; extra == "test"
|
|
68
68
|
Requires-Dist: pytest-xdist==3.8.0; extra == "test"
|
|
69
69
|
Requires-Dist: assertpy==1.1; extra == "test"
|
|
70
70
|
Provides-Extra: typing
|
|
@@ -121,6 +121,7 @@ Lintro is a unified command-line interface that brings together multiple code qu
|
|
|
121
121
|
| [](https://github.com/terrencepreilly/darglint) | 🐍 Python | - |
|
|
122
122
|
| [](https://github.com/hadolint/hadolint) | 🐳 Dockerfile | - |
|
|
123
123
|
| [](https://prettier.io/) | 🟨 JS/TS · 🧾 JSON | ✅ |
|
|
124
|
+
| [](https://github.com/psf/black) | 🐍 Python | ✅ |
|
|
124
125
|
| [](https://github.com/astral-sh/ruff) | 🐍 Python | ✅ |
|
|
125
126
|
| [](https://github.com/adrienverge/yamllint) | 🧾 YAML | - |
|
|
126
127
|
|
|
@@ -216,11 +217,12 @@ lintro check --exclude "migrations,node_modules,dist"
|
|
|
216
217
|
# Tool-specific options use key=value (lists with |)
|
|
217
218
|
lintro check --tool-options "ruff:line_length=88,prettier:print_width=80"
|
|
218
219
|
|
|
219
|
-
# Ruff
|
|
220
|
-
#
|
|
221
|
-
#
|
|
222
|
-
|
|
223
|
-
lintro format --tool-options ruff:format=
|
|
220
|
+
# Ruff + Black cooperation:
|
|
221
|
+
# Lintro prefers Ruff for linting and Black for formatting.
|
|
222
|
+
# When Black is configured as a post-check, Lintro disables Ruff formatting by
|
|
223
|
+
# default to avoid double-formatting. Override if needed:
|
|
224
|
+
lintro format --tool-options ruff:format=True # force Ruff to format
|
|
225
|
+
lintro check --tool-options ruff:format_check=True # force Ruff format check
|
|
224
226
|
```
|
|
225
227
|
|
|
226
228
|
### CI/CD Integration
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
lintro/__init__.py,sha256=
|
|
1
|
+
lintro/__init__.py,sha256=2iiiR-odH9Z1PRlxA-gFkz8CL2czUJ2VYw88rjeMsmY,110
|
|
2
2
|
lintro/__main__.py,sha256=McxM6wEcEeCLBHZs0F8xzT1PxVqJYkjtaPq1_-Nug-0,106
|
|
3
3
|
lintro/cli.py,sha256=Fy5nqdSg4id0gjGbPy82wRTK3aZMWbRdRDnwAbIv-vs,2333
|
|
4
4
|
lintro/ascii-art/fail.txt,sha256=gshKngSrz5FvJdP6g7lPygpLsLsZZh4etBU_wR7PXOw,56396
|
|
@@ -31,9 +31,10 @@ lintro/formatters/styles/json.py,sha256=aZobZxntAiyo92_elI1VznrOd8jzEPrU7MUQBQHd
|
|
|
31
31
|
lintro/formatters/styles/markdown.py,sha256=proUn2UEhNceTw6mVv_KSBYinLekgATx58ZWiu_PT1U,1309
|
|
32
32
|
lintro/formatters/styles/plain.py,sha256=_-4ziK6vBtvxI1wk-qLJHqKTUMs0SGWaBJPz1zV4Ngc,1125
|
|
33
33
|
lintro/formatters/tools/__init__.py,sha256=5HxvLscHFl-dYv0h_X6_-rEaszdVU-XPNtL-ZkliGvU,1289
|
|
34
|
-
lintro/formatters/tools/actionlint_formatter.py,sha256=
|
|
35
|
-
lintro/formatters/tools/bandit_formatter.py,sha256=
|
|
36
|
-
lintro/formatters/tools/
|
|
34
|
+
lintro/formatters/tools/actionlint_formatter.py,sha256=GiUlD7DSW375seiPNLwdX3mOjtcn56T7z7ho4nQzEz8,2812
|
|
35
|
+
lintro/formatters/tools/bandit_formatter.py,sha256=WP7haIWGjIPuGZf1FQ5Ixi5DKIySHGdX-L7hZcKnFuw,3093
|
|
36
|
+
lintro/formatters/tools/black_formatter.py,sha256=xFmcmdfgQributNqQRBtp7MwPfR6QKFCsBo6urk0tDY,1623
|
|
37
|
+
lintro/formatters/tools/darglint_formatter.py,sha256=NG5V32PX7PnxOccisyXYy02TVUp15r1dzwZzC9KQRsw,2202
|
|
37
38
|
lintro/formatters/tools/hadolint_formatter.py,sha256=enugwgR571IFv-75HJ-RCrsK9GBZfH-Bwb-WjoJGd2Y,2608
|
|
38
39
|
lintro/formatters/tools/prettier_formatter.py,sha256=VtV3uSoNhUtatqQa18QtQgcBAmzMPyjS2xDIAzpI0IY,2470
|
|
39
40
|
lintro/formatters/tools/ruff_formatter.py,sha256=3R3ByBDN5YzR71cLOyNQMWLDkVU8qif_PweoTQXskkM,4011
|
|
@@ -47,46 +48,49 @@ lintro/parsers/__init__.py,sha256=53UA1LuS21BL4xj8i81Qb59dKXe3jCFLBrDVqvvNHVQ,28
|
|
|
47
48
|
lintro/parsers/actionlint/__init__.py,sha256=N953d0kbJEOZE9cG4eq9BjiSErdk10GMrngV_tKjLvo,33
|
|
48
49
|
lintro/parsers/actionlint/actionlint_issue.py,sha256=H_BQr04KAGHpVp1qKqETcWLi3i-u6atl7ccDae-jqX8,636
|
|
49
50
|
lintro/parsers/actionlint/actionlint_parser.py,sha256=FAovzY877UeaDj7ZHb0zy6Y_hsidWS6UR1O8KCYVISU,1889
|
|
51
|
+
lintro/parsers/black/black_issue.py,sha256=RwrT7n8aw4Nybakv83eXoeUxZlDtHwicWKNfrHYIYOg,507
|
|
52
|
+
lintro/parsers/black/black_parser.py,sha256=mCbEy4aTRtxC_SKKPNK6hThGEu8C0m9EnliFW__Sa3Y,2958
|
|
50
53
|
lintro/parsers/darglint/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
54
|
lintro/parsers/darglint/darglint_issue.py,sha256=f43blLSM13r1VyyGwk-bjtC7raBCjRqwlnPw7Nmx9ic,127
|
|
52
|
-
lintro/parsers/darglint/darglint_parser.py,sha256=
|
|
55
|
+
lintro/parsers/darglint/darglint_parser.py,sha256=pbIGnmHVKjf8OaxvhQbDWWXAFZEictb3FfuhoGv_I00,2046
|
|
53
56
|
lintro/parsers/hadolint/__init__.py,sha256=vU33M_cj6fyg7aqZthz8MFUMfBIshX_Nx3DNuQmbHD4,30
|
|
54
57
|
lintro/parsers/hadolint/hadolint_issue.py,sha256=VlTzTPHcluFZihFL-Tkg7UuXp1fQcD03eDCH0sr1qHU,582
|
|
55
|
-
lintro/parsers/hadolint/hadolint_parser.py,sha256=
|
|
58
|
+
lintro/parsers/hadolint/hadolint_parser.py,sha256=Q7Hf6sL45s38O3C9dbBYzOpDlb0KGFj0U3Yry_ixdK8,1810
|
|
56
59
|
lintro/parsers/prettier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
60
|
lintro/parsers/prettier/prettier_issue.py,sha256=yeOUmkb79mhYmidcx-iZgxvsNl_jkjT3ZCqT_Vo27rw,164
|
|
58
61
|
lintro/parsers/prettier/prettier_parser.py,sha256=lH50rhFHbWWLH50CiTlyIvjgbx9vz1hiIdtxEXi7uJw,2043
|
|
59
62
|
lintro/parsers/ruff/__init__.py,sha256=1oT00c82qKfveRqa4FnSedAEQjQVrb9BspJEUQJn-Kk,26
|
|
60
63
|
lintro/parsers/ruff/ruff_issue.py,sha256=96ht6YWImOBiRTo0ATlM1PvVhgIwFiuN8810emm9nXo,1142
|
|
61
|
-
lintro/parsers/ruff/ruff_parser.py,sha256=
|
|
64
|
+
lintro/parsers/ruff/ruff_parser.py,sha256=dwNaDgb-96DPuIiAgtHa0E1lTtzr2FLeWdZD_LVZhxE,4576
|
|
62
65
|
lintro/parsers/yamllint/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
66
|
lintro/parsers/yamllint/yamllint_issue.py,sha256=jWawdGUiTI1HADbhg8yEdZfC6yHcmk9FDzpr3PBUPBg,608
|
|
64
|
-
lintro/parsers/yamllint/yamllint_parser.py,sha256=
|
|
65
|
-
lintro/tools/__init__.py,sha256=
|
|
66
|
-
lintro/tools/tool_enum.py,sha256=
|
|
67
|
+
lintro/parsers/yamllint/yamllint_parser.py,sha256=ol44xhJcspnGIsEta8vVv1xi-sIbpB12CovmT94QFmQ,1947
|
|
68
|
+
lintro/tools/__init__.py,sha256=S-L_x7Hzp-Ja-QezupEUwF6-uhRl4ZXSIpRx59jvsaA,1410
|
|
69
|
+
lintro/tools/tool_enum.py,sha256=ECok554KLqeLuU2xyLl1fcqzh77x9ojc-6Z7CRBRQUU,851
|
|
67
70
|
lintro/tools/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
|
-
lintro/tools/core/tool_base.py,sha256=
|
|
71
|
+
lintro/tools/core/tool_base.py,sha256=pnu1sMwPuICCOy_CZRip6HhvHVSYfs7q5Sfpi9zUX9E,12360
|
|
69
72
|
lintro/tools/core/tool_manager.py,sha256=yKQONy17t7-fq1k9dkrMk6lZaAvaSwp7-JcvJFZMoYc,5103
|
|
70
73
|
lintro/tools/implementations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
74
|
lintro/tools/implementations/tool_actionlint.py,sha256=7b1pUxs9Ln6KmoLiRQBmyDeq9SmgZ08e0DxleM9NEt8,5466
|
|
72
|
-
lintro/tools/implementations/tool_bandit.py,sha256=
|
|
75
|
+
lintro/tools/implementations/tool_bandit.py,sha256=Ck1fT8I9CSRTJ8zYqXYsVMQ_-HSp_VzUcB6GWuTahvI,15939
|
|
76
|
+
lintro/tools/implementations/tool_black.py,sha256=x1U6NhdRxxYE5Tmvh-LoxcWtIkwHceeJWMUROa9tAJ4,9680
|
|
73
77
|
lintro/tools/implementations/tool_darglint.py,sha256=zj8hQ8bVW3fwO8dsK9tdXzyL1yzZvqiEetVGvxhGe4g,9396
|
|
74
78
|
lintro/tools/implementations/tool_hadolint.py,sha256=NfHLoThp23V-n5chSfrBZetleXsRR4oYxkLxOkJxU0g,11479
|
|
75
|
-
lintro/tools/implementations/tool_prettier.py,sha256=
|
|
76
|
-
lintro/tools/implementations/tool_ruff.py,sha256=
|
|
79
|
+
lintro/tools/implementations/tool_prettier.py,sha256=ecpeG0sqbTRIQ5KziiwN8gmlPzoKHebdC2AkEKHUWrk,9447
|
|
80
|
+
lintro/tools/implementations/tool_ruff.py,sha256=8WIpOKSc6HmuvEFCWgTqBX9X4T3MSD-RKesv4bs2lpQ,25361
|
|
77
81
|
lintro/tools/implementations/tool_yamllint.py,sha256=0powR9F3FkIq-b7PI0-XWdh7nx7rR3HVMtvEaz_NWeA,8831
|
|
78
82
|
lintro/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
|
-
lintro/utils/ascii_normalize_cli.py,sha256=
|
|
80
|
-
lintro/utils/config.py,sha256=
|
|
81
|
-
lintro/utils/console_logger.py,sha256=
|
|
83
|
+
lintro/utils/ascii_normalize_cli.py,sha256=8Pi9XHIIIYCyPCq-JOAPnj5tYbz6XLmFLO7KypCv3EA,2408
|
|
84
|
+
lintro/utils/config.py,sha256=3AVwNAteT-enN6Ica8jJbPwEFO94i4F7uWiEA1HSpJY,1427
|
|
85
|
+
lintro/utils/console_logger.py,sha256=N0n5LomG6MDqu4tSPbmhBsIB6lzpRl5M53tZx6EoF4k,33104
|
|
82
86
|
lintro/utils/formatting.py,sha256=khC9hYBva5xqBV1IqNcivRH9gRdvWw6u6mh2TZLTy7E,5346
|
|
83
|
-
lintro/utils/output_manager.py,sha256=
|
|
87
|
+
lintro/utils/output_manager.py,sha256=oIE0g8LNVQcWSQOb1MbDVqGYPrOjBGuUZ4R80M1RevQ,10213
|
|
84
88
|
lintro/utils/path_utils.py,sha256=NJP3vjVDcRBgUHtYNrpL0tRa0Sc3oQhGX3_2WWzdZE4,1395
|
|
85
|
-
lintro/utils/tool_executor.py,sha256=
|
|
86
|
-
lintro/utils/tool_utils.py,sha256=
|
|
87
|
-
lintro-0.
|
|
88
|
-
lintro-0.
|
|
89
|
-
lintro-0.
|
|
90
|
-
lintro-0.
|
|
91
|
-
lintro-0.
|
|
92
|
-
lintro-0.
|
|
89
|
+
lintro/utils/tool_executor.py,sha256=8-m7nQKLRlKHBTvzT7iLmaHYZ3-2s0t4zUbC-py8-H8,26204
|
|
90
|
+
lintro/utils/tool_utils.py,sha256=zobweCIANBxXxHUERajFDshQyZGlEnJPQ52NleOrDdQ,15884
|
|
91
|
+
lintro-0.6.0.dist-info/licenses/LICENSE,sha256=CwaAnyD2psonDBBJjbqFUz00W8nQw-FGDlEGZReUV6A,1069
|
|
92
|
+
lintro-0.6.0.dist-info/METADATA,sha256=OJJqMjydyyG24aRGue4W3yGQHDSP-qAYsS7hKNkC674,13881
|
|
93
|
+
lintro-0.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
94
|
+
lintro-0.6.0.dist-info/entry_points.txt,sha256=SYSk35jFyNLEHyrofSJsRv4qFN9NsT4VWSbvnTS9ov0,43
|
|
95
|
+
lintro-0.6.0.dist-info/top_level.txt,sha256=_D-7eyV6gNBOoIwHuf_h60wN_RWiw8GxB430Il9VKhU,7
|
|
96
|
+
lintro-0.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|