id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
30,200
test_no_changed_when.py
ansible_ansible-lint/test/rules/test_no_changed_when.py
"""Tests for no-change-when rule.""" from ansiblelint.rules import RulesCollection from ansiblelint.rules.no_changed_when import CommandHasChangesCheckRule from ansiblelint.runner import Runner def test_command_changes_positive() -> None: """Positive test for no-changed-when.""" collection = RulesCollection(...
871
Python
.py
19
41.842105
72
0.754427
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,201
ematcher.py
ansible_ansible-lint/test/rules/fixtures/ematcher.py
"""Custom rule used as fixture.""" from ansiblelint.rules import AnsibleLintRule class EMatcherRule(AnsibleLintRule): """BANNED string found.""" id = "TEST0001" description = ( "This is a test custom rule that looks for lines containing BANNED string" ) tags = ["fake", "dummy", "test1"] ...
393
Python
.py
11
30.636364
82
0.671088
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,202
unset_variable_matcher.py
ansible_ansible-lint/test/rules/fixtures/unset_variable_matcher.py
"""Custom linting rule used as test fixture.""" from ansiblelint.rules import AnsibleLintRule class UnsetVariableMatcherRule(AnsibleLintRule): """Line contains untemplated variable.""" id = "TEST0002" description = ( "This is a test rule that looks for lines post templating that still contain {{...
435
Python
.py
11
34.454545
88
0.682578
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,203
raw_task.py
ansible_ansible-lint/test/rules/fixtures/raw_task.py
"""Test Rule that needs_raw_task.""" from __future__ import annotations from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.file_utils import Lintable from ansiblelint.utils import Task class RawTaskRule(AnsibleLintRule): """Test rule that ...
891
Python
.py
23
33.043478
80
0.666279
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,204
rebuild.py
ansible_ansible-lint/test/schemas/src/rebuild.py
"""Utility to generate some complex patterns.""" import copy import json import keyword import sys from pathlib import Path from typing import Any play_keywords = list( filter( None, """\ any_errors_fatal become become_exe become_flags become_method become_user check_mode collections connection de...
3,542
Python
.py
127
21.19685
115
0.581375
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,205
example_com_rule.py
ansible_ansible-lint/test/custom_rules/example_com/example_com_rule.py
# Copyright (c) 2020, Ansible Project # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, di...
1,276
Python
.py
24
51.666667
79
0.786058
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,206
custom_rule.py
ansible_ansible-lint/test/custom_rules/example_inc/custom_rule.py
# Copyright (c) 2020, Ansible Project # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, di...
1,265
Python
.py
24
51.208333
79
0.787389
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,207
generate_docs.py
ansible_ansible-lint/tools/generate_docs.py
#!python3 """Script that tests rule markdown documentation.""" from __future__ import annotations import subprocess from pathlib import Path from ansiblelint.cli import get_rules_dirs from ansiblelint.config import Options from ansiblelint.rules import RulesCollection, TransformMixin if __name__ == "__main__": s...
1,011
Python
.py
30
28.533333
63
0.663934
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,208
some_filter.py
ansible_ansible-lint/examples/playbooks/filter_plugins/some_filter.py
"""Sample adjacent filter plugin.""" from __future__ import annotations class FilterModule: # pylint: disable=too-few-public-methods """Ansible filters.""" def filters(self): # type: ignore[no-untyped-def] """Return list of exposed filters.""" return { "some_filter": str, ...
325
Python
.py
9
29.777778
61
0.63141
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,209
some_action.py
ansible_ansible-lint/examples/playbooks/action_plugins/some_action.py
"""Sample action_plugin.""" from ansible.plugins.action import ActionBase class ActionModule(ActionBase): # type: ignore[misc] """Sample module.""" def run(self, tmp=None, task_vars=None): # type: ignore[no-untyped-def] """.""" super().run(tmp, task_vars) ret = {"foo": "bar"} ...
353
Python
.py
9
33.333333
76
0.620588
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,210
task_has_tag.py
ansible_ansible-lint/examples/rules/task_has_tag.py
"""Example implementation of a rule requiring tasks to have tags set.""" from __future__ import annotations from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.file_utils import Lintable from ansiblelint.utils import Task class TaskHasTag(Ansib...
1,127
Python
.py
30
30.3
72
0.639631
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,211
alpha.py
ansible_ansible-lint/examples/.collection/plugins/modules/alpha.py
"""An ansible test module.""" DOCUMENTATION = """ module: mod_1 author: - test short_description: This is a test module description: - This is a test module version_added: 1.0.0 options: foo: description: - Dummy option I(foo) type: str bar: description: - Dummy option I(bar) default: candi...
662
Python
.py
40
13.525
40
0.655897
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,212
beta.py
ansible_ansible-lint/examples/.collection/plugins/modules/deep/beta.py
"""An ansible test module.""" DOCUMENTATION = """ module: mod_2 author: - test short_description: This is a test module description: - This is a test module version_added: 1.0.0 options: foo: description: - Dummy option I(foo) type: str bar: description: - Dummy option I(bar) default: candi...
662
Python
.py
40
13.525
40
0.655897
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,213
gamma.py
ansible_ansible-lint/examples/.collection/plugins/modules/tests/gamma.py
"""An ansible test module.""" DOCUMENTATION = """ module: mod_1 author: - test short_description: This is a test module description: - This is a test module version_added: 1.0.0 options: foo: description: - Dummy option I(foo) type: str bar: description: - Dummy option I(bar) default: candi...
662
Python
.py
40
13.525
40
0.655897
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,214
transformer.py
ansible_ansible-lint/src/ansiblelint/transformer.py
# cspell:ignore classinfo """Transformer implementation.""" from __future__ import annotations import logging from typing import TYPE_CHECKING, cast from ruamel.yaml.comments import CommentedMap, CommentedSeq from ansiblelint.file_utils import Lintable from ansiblelint.rules import AnsibleLintRule, TransformMixin f...
7,724
Python
.py
150
39.54
172
0.598383
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,215
yaml_utils.py
ansible_ansible-lint/src/ansiblelint/yaml_utils.py
"""Utility helpers to simplify working with yaml-based data.""" # pylint: disable=too-many-lines from __future__ import annotations import functools import logging import os import re from collections.abc import Callable, Iterator, Sequence from io import StringIO from pathlib import Path from re import Pattern from ...
49,330
Python
.py
1,086
35.350829
329
0.60325
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,216
errors.py
ansible_ansible-lint/src/ansiblelint/errors.py
"""Exceptions and error representations.""" from __future__ import annotations import functools from dataclasses import dataclass, field from typing import TYPE_CHECKING, Any from ansiblelint._internal.rules import BaseRule, RuntimeErrorRule from ansiblelint.file_utils import Lintable if TYPE_CHECKING: from ans...
5,955
Python
.py
136
35.492647
108
0.634698
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,217
__main__.py
ansible_ansible-lint/src/ansiblelint/__main__.py
#!/usr/bin/env python # Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights ...
18,446
Python
.py
435
35.48046
165
0.667355
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,218
config.py
ansible_ansible-lint/src/ansiblelint/config.py
"""Store configuration options as a singleton.""" from __future__ import annotations import json import logging import os import sys import time import urllib.request import warnings from dataclasses import dataclass, field from functools import lru_cache from http.client import HTTPException from importlib.metadata ...
13,454
Python
.py
303
38.171617
154
0.638986
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,219
_mockings.py
ansible_ansible-lint/src/ansiblelint/_mockings.py
"""Utilities for mocking ansible modules and roles.""" from __future__ import annotations import contextlib import logging import re import sys from typing import TYPE_CHECKING from ansiblelint.constants import ANSIBLE_MOCKED_MODULE, RC if TYPE_CHECKING: from pathlib import Path from ansiblelint.config imp...
3,932
Python
.py
111
25.675676
82
0.561745
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,220
constants.py
ansible_ansible-lint/src/ansiblelint/constants.py
"""Constants used by AnsibleLint.""" from enum import Enum from pathlib import Path from typing import Literal DEFAULT_RULESDIR = Path(__file__).parent / "rules" CUSTOM_RULESDIR_ENVVAR = "ANSIBLE_LINT_CUSTOM_RULESDIR" RULE_DOC_URL = "https://ansible.readthedocs.io/projects/lint/rules/" SKIP_SCHEMA_UPDATE = "ANSIBLE_L...
6,363
Python
.py
204
27.122549
183
0.665525
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,221
cli.py
ansible_ansible-lint/src/ansiblelint/cli.py
"""CLI parser setup and helpers.""" from __future__ import annotations import argparse import logging import os import sys from argparse import Namespace from pathlib import Path from typing import TYPE_CHECKING, Any from ansiblelint.config import ( DEFAULT_KINDS, DEFAULT_WARN_LIST, PROFILES, Options...
21,286
Python
.py
595
27.618487
156
0.600514
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,222
app.py
ansible_ansible-lint/src/ansiblelint/app.py
"""Application.""" from __future__ import annotations import copy import itertools import logging import os import sys from functools import lru_cache from pathlib import Path from typing import TYPE_CHECKING, Any from ansible_compat.runtime import Runtime from rich.markup import escape from rich.table import Table ...
17,386
Python
.py
393
33.239186
200
0.601299
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,223
skip_utils.py
ansible_ansible-lint/src/ansiblelint/skip_utils.py
# (c) 2019-2020, Ansible by Red Hat # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, dist...
10,879
Python
.py
263
33.197719
100
0.648083
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,224
generate_docs.py
ansible_ansible-lint/src/ansiblelint/generate_docs.py
"""Utils to generate rules documentation.""" import logging from collections.abc import Iterable from rich import box from rich.console import RenderableType, group from rich.markdown import Markdown from rich.table import Table from ansiblelint.config import PROFILES from ansiblelint.constants import RULE_DOC_URL f...
4,568
Python
.py
103
36.563107
130
0.628101
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,225
runner.py
ansible_ansible-lint/src/ansiblelint/runner.py
"""Runner implementation.""" from __future__ import annotations import json import logging import math import multiprocessing import multiprocessing.pool import os import re import subprocess import tempfile import warnings from dataclasses import dataclass from fnmatch import fnmatch from functools import cache from...
26,832
Python
.py
622
30.083601
145
0.560568
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,226
utils.py
ansible_ansible-lint/src/ansiblelint/utils.py
# Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify...
41,554
Python
.py
1,011
31.591494
112
0.605335
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,227
text.py
ansible_ansible-lint/src/ansiblelint/text.py
"""Text utils.""" from __future__ import annotations import re from functools import cache RE_HAS_JINJA = re.compile(r"{[{%#].*[%#}]}", re.DOTALL) RE_HAS_GLOB = re.compile("[][*?]") RE_IS_FQCN_OR_NAME = re.compile(r"^\w+(\.\w+\.\w+)?$") def strip_ansi_escape(data: str | bytes) -> str: """Remove all ANSI escape...
1,923
Python
.py
45
38.644444
96
0.670791
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,228
__init__.py
ansible_ansible-lint/src/ansiblelint/__init__.py
# Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify...
1,256
Python
.py
23
53.521739
79
0.781478
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,229
color.py
ansible_ansible-lint/src/ansiblelint/color.py
"""Console coloring and terminal support.""" from __future__ import annotations from typing import Any import rich import rich.markdown from rich.console import Console from rich.default_styles import DEFAULT_STYLES from rich.style import Style from rich.syntax import Syntax from rich.theme import Theme # WARNING: ...
3,434
Python
.py
90
34.9
111
0.714929
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,230
logger.py
ansible_ansible-lint/src/ansiblelint/logger.py
"""Utils related to logging.""" import logging import time from collections.abc import Iterator from contextlib import contextmanager from typing import Any _logger = logging.getLogger(__name__) @contextmanager def timed_info(msg: Any, *args: Any) -> Iterator[None]: """Context manager for logging slow operation...
515
Python
.py
16
28.4375
73
0.692929
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,231
loaders.py
ansible_ansible-lint/src/ansiblelint/loaders.py
"""Utilities for loading various files.""" from __future__ import annotations import logging import os from collections import defaultdict from functools import partial from typing import TYPE_CHECKING, Any, NamedTuple import yaml from yaml import YAMLError try: from yaml import CFullLoader as FullLoader fr...
2,297
Python
.py
62
30.032258
87
0.649051
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,232
requirements.py
ansible_ansible-lint/src/ansiblelint/requirements.py
"""Utilities for checking python packages requirements.""" import importlib_metadata from packaging.requirements import Requirement from packaging.specifiers import SpecifierSet from packaging.version import Version class Reqs(dict[str, SpecifierSet]): """Utility class for working with package dependencies.""" ...
1,010
Python
.py
22
38.272727
80
0.677189
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,233
stats.py
ansible_ansible-lint/src/ansiblelint/stats.py
"""Module hosting functionality about reporting.""" from __future__ import annotations from dataclasses import dataclass, field @dataclass(order=True) class TagStats: """Tag statistics.""" order: int = 0 # to be computed based on rule's profile tag: str = "" # rule effective id (can be multiple tags ...
1,066
Python
.py
27
34.407407
81
0.662779
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,234
version.py
ansible_ansible-lint/src/ansiblelint/version.py
"""Ansible-lint version information.""" try: from ._version import version as __version__ except ImportError: # pragma: no cover try: import pkg_resources __version__ = pkg_resources.get_distribution("ansible-lint").version except Exception: # pylint: disable=broad-except # noqa: BLE001 ...
501
Python
.py
12
36.166667
79
0.664609
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,235
file_utils.py
ansible_ansible-lint/src/ansiblelint/file_utils.py
"""Utility functions related to file operations.""" from __future__ import annotations import copy import logging import os import sys from collections import defaultdict from contextlib import contextmanager from pathlib import Path from tempfile import NamedTemporaryFile from typing import TYPE_CHECKING, Any, cast ...
21,740
Python
.py
519
31.678227
106
0.589439
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,236
__init__.py
ansible_ansible-lint/src/ansiblelint/formatters/__init__.py
"""Output formatters.""" from __future__ import annotations import hashlib import json import os from pathlib import Path from typing import TYPE_CHECKING, Any, Generic, TypeVar import rich from ansiblelint.config import options from ansiblelint.version import __version__ if TYPE_CHECKING: from ansiblelint.err...
12,817
Python
.py
288
34.118056
157
0.582464
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,237
conftest.py
ansible_ansible-lint/src/ansiblelint/rules/conftest.py
"""Makes pytest fixtures available.""" # pylint: disable=wildcard-import,unused-wildcard-import from ansiblelint.testing.fixtures import * # noqa: F403
154
Python
.py
3
50
56
0.793333
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,238
no_log_password.py
ansible_ansible-lint/src/ansiblelint/rules/no_log_password.py
# Copyright 2018, Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
10,443
Python
.py
317
25.731861
88
0.610808
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,239
meta_runtime.py
ansible_ansible-lint/src/ansiblelint/rules/meta_runtime.py
"""Implementation of meta-runtime rule.""" from __future__ import annotations import sys from typing import TYPE_CHECKING from packaging.specifiers import SpecifierSet from ansiblelint.rules import AnsibleLintRule # Copyright (c) 2018, Ansible Project if TYPE_CHECKING: from ansiblelint.errors import MatchErr...
5,134
Python
.py
127
29.251969
131
0.588802
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,240
command_instead_of_shell.py
ansible_ansible-lint/src/ansiblelint/rules/command_instead_of_shell.py
"""Implementation of command-instead-of-shell rule.""" # Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including w...
4,928
Python
.py
114
35.789474
88
0.664929
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,241
partial_become.py
ansible_ansible-lint/src/ansiblelint/rules/partial_become.py
"""Implementation of partial-become rule.""" # Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without lim...
9,542
Python
.py
221
32.945701
101
0.603187
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,242
inline_env_var.py
ansible_ansible-lint/src/ansiblelint/rules/inline_env_var.py
"""Implementation of inside-env-var rule.""" # Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without lim...
2,648
Python
.py
66
34.363636
79
0.682348
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,243
complexity.py
ansible_ansible-lint/src/ansiblelint/rules/complexity.py
"""Implementation of limiting number of tasks.""" from __future__ import annotations import re import sys from typing import TYPE_CHECKING, Any from ansiblelint.constants import LINE_NUMBER_KEY from ansiblelint.rules import AnsibleLintRule, RulesCollection if TYPE_CHECKING: from ansiblelint.config import Option...
4,260
Python
.py
97
33.536082
186
0.60965
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,244
meta_no_tags.py
ansible_ansible-lint/src/ansiblelint/rules/meta_no_tags.py
"""Implementation of meta-no-tags rule.""" from __future__ import annotations import re import sys from pathlib import Path from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule # Copyright (c) 2018, Ansible Project if TYPE_CHECKING: from typing import Any from ansiblelint.errors...
5,054
Python
.py
135
26.8
88
0.5613
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,245
syntax_check.py
ansible_ansible-lint/src/ansiblelint/rules/syntax_check.py
"""Rule definition for ansible syntax check.""" from __future__ import annotations import re from dataclasses import dataclass from ansiblelint.rules import AnsibleLintRule @dataclass class KnownError: """Class that tracks result of linting.""" tag: str regex: re.Pattern[str] # Order matters, we onl...
2,850
Python
.py
72
32.263889
309
0.594507
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,246
no_handler.py
ansible_ansible-lint/src/ansiblelint/rules/no_handler.py
# Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
3,930
Python
.py
98
33.765306
100
0.667978
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,247
no_tabs.py
ansible_ansible-lint/src/ansiblelint/rules/no_tabs.py
"""Implementation of no-tabs rule.""" # Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018, Ansible Project from __future__ import annotations import sys from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule from ansiblelint.text import has_jinja from ansiblelint.yaml_util...
3,060
Python
.py
77
31.584416
77
0.618439
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,248
no_prompting.py
ansible_ansible-lint/src/ansiblelint/rules/no_prompting.py
"""Implementation of no-prompting rule.""" from __future__ import annotations import sys from typing import TYPE_CHECKING, Any from ansiblelint.constants import LINE_NUMBER_KEY from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.config import Options from ansiblelint.errors impo...
2,581
Python
.py
63
33.079365
87
0.645367
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,249
latest.py
ansible_ansible-lint/src/ansiblelint/rules/latest.py
"""Implementation of latest rule.""" from __future__ import annotations from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.errors import MatchError from ansiblelint.file_utils import Lintable from ansiblelint.utils import Task class Latest...
1,457
Python
.py
39
30.205128
78
0.613475
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,250
ignore_errors.py
ansible_ansible-lint/src/ansiblelint/rules/ignore_errors.py
"""IgnoreErrorsRule used with ansible-lint.""" from __future__ import annotations import sys from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.file_utils import Lintable from ansiblelint.utils import Task class IgnoreErrorsRule(AnsibleLintRul...
3,984
Python
.py
121
26.561983
106
0.636908
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,251
fqcn.py
ansible_ansible-lint/src/ansiblelint/rules/fqcn.py
"""Rule definition for usage of fully qualified collection names for builtins.""" from __future__ import annotations import logging import sys from typing import TYPE_CHECKING, Any from ruamel.yaml.comments import CommentedSeq from ansiblelint.constants import LINE_NUMBER_KEY from ansiblelint.rules import AnsibleLi...
11,100
Python
.py
282
28.553191
154
0.564122
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,252
meta_incorrect.py
ansible_ansible-lint/src/ansiblelint/rules/meta_incorrect.py
"""Implementation of meta-incorrect rule.""" # Copyright (c) 2018, Ansible Project from __future__ import annotations import sys from typing import TYPE_CHECKING from ansiblelint.constants import LINE_NUMBER_KEY from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.errors import Match...
2,565
Python
.py
63
31.984127
88
0.627262
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,253
package_latest.py
ansible_ansible-lint/src/ansiblelint/rules/package_latest.py
"""Implementations of the package-latest rule.""" # Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
2,651
Python
.py
75
29.306667
81
0.656274
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,254
no_free_form.py
ansible_ansible-lint/src/ansiblelint/rules/no_free_form.py
"""Implementation of NoFreeFormRule.""" from __future__ import annotations import functools import re import sys from typing import TYPE_CHECKING, Any from ansiblelint.constants import INCLUSION_ACTION_NAMES, LINE_NUMBER_KEY from ansiblelint.rules import AnsibleLintRule, TransformMixin from ansiblelint.rules.key_ord...
7,519
Python
.py
179
26.865922
124
0.492411
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,255
literal_compare.py
ansible_ansible-lint/src/ansiblelint/rules/literal_compare.py
"""Implementation of the literal-compare rule.""" # Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018-2021, Ansible Project from __future__ import annotations import re import sys from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule from ansiblelint.yaml_utils import ne...
2,528
Python
.py
73
24.821918
86
0.572951
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,256
risky_file_permissions.py
ansible_ansible-lint/src/ansiblelint/rules/risky_file_permissions.py
# Copyright (c) 2020 Sorin Sbarnea <sorin.sbarnea@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mod...
5,849
Python
.py
143
34.237762
84
0.667606
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,257
key_order.py
ansible_ansible-lint/src/ansiblelint/rules/key_order.py
"""All tasks should be have name come first.""" from __future__ import annotations import functools import sys from dataclasses import dataclass from typing import TYPE_CHECKING, Any from ansiblelint.constants import ANNOTATION_KEYS, LINE_NUMBER_KEY from ansiblelint.errors import MatchError, RuleMatchTransformMeta f...
6,918
Python
.py
185
28.535135
87
0.581829
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,258
avoid_implicit.py
ansible_ansible-lint/src/ansiblelint/rules/avoid_implicit.py
"""Implementation of avoid-implicit rule.""" # https://github.com/ansible/ansible-lint/issues/2501 from __future__ import annotations import sys from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.file_utils import Lintable from ansiblelint.utils...
2,100
Python
.py
50
35.32
85
0.676644
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,259
var_naming.py
ansible_ansible-lint/src/ansiblelint/rules/var_naming.py
"""Implementation of var-naming rule.""" from __future__ import annotations import keyword import re import sys from typing import TYPE_CHECKING, Any, NamedTuple from ansible.parsing.yaml.objects import AnsibleUnicode from ansible.vars.reserved import get_reserved_names from ansiblelint.config import Options, optio...
18,971
Python
.py
471
28.719745
101
0.558331
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,260
galaxy.py
ansible_ansible-lint/src/ansiblelint/rules/galaxy.py
"""Implementation of GalaxyRule.""" from __future__ import annotations import sys from typing import TYPE_CHECKING, Any from ansiblelint.constants import FILENAME_KEY, LINE_NUMBER_KEY from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.errors import MatchError from ansiblelint.f...
6,861
Python
.py
173
26.965318
126
0.537584
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,261
no_changed_when.py
ansible_ansible-lint/src/ansiblelint/rules/no_changed_when.py
"""Implementation of the no-changed-when rule.""" # Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
3,557
Python
.py
93
31.064516
79
0.654683
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,262
risky_octal.py
ansible_ansible-lint/src/ansiblelint/rules/risky_octal.py
"""Implementation of risky-octal rule.""" # Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without l...
5,997
Python
.py
173
26.751445
127
0.600862
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,263
role_name.py
ansible_ansible-lint/src/ansiblelint/rules/role_name.py
"""Implementation of role-name rule.""" # Copyright (c) 2020 Gael Chamoulaud <gchamoul@redhat.com> # Copyright (c) 2020 Sorin Sbarnea <ssbarnea@redhat.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # ...
8,409
Python
.py
204
29.960784
115
0.564579
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,264
jinja.py
ansible_ansible-lint/src/ansiblelint/rules/jinja.py
"""Rule for checking content of jinja template strings.""" from __future__ import annotations import logging import os import re import sys from dataclasses import dataclass from pathlib import Path from typing import TYPE_CHECKING, Any, NamedTuple import black import jinja2 from ansible.errors import AnsibleError, ...
35,527
Python
.py
833
28.527011
398
0.491059
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,265
name.py
ansible_ansible-lint/src/ansiblelint/rules/name.py
"""Implementation of NameRule.""" from __future__ import annotations import re import sys from typing import TYPE_CHECKING, Any import wcmatch.pathlib import wcmatch.wcmatch from ansiblelint.constants import LINE_NUMBER_KEY from ansiblelint.file_utils import Lintable from ansiblelint.rules import AnsibleLintRule, T...
13,743
Python
.py
335
28.635821
120
0.544095
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,266
deprecated_module.py
ansible_ansible-lint/src/ansiblelint/rules/deprecated_module.py
"""Implementation of deprecated-module rule.""" # Copyright (c) 2018, Ansible Project from __future__ import annotations from typing import TYPE_CHECKING, Any from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.file_utils import Lintable class DeprecatedModuleRule(AnsibleLintRule...
2,000
Python
.py
69
21.289855
82
0.574701
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,267
yaml_rule.py
ansible_ansible-lint/src/ansiblelint/rules/yaml_rule.py
"""Implementation of yaml linting rule (yamllint integration).""" from __future__ import annotations import logging import sys from collections.abc import Iterable, MutableMapping, MutableSequence from typing import TYPE_CHECKING from yamllint.linter import run as run_yamllint from ansiblelint.constants import LINE...
8,343
Python
.py
219
27.136986
96
0.554883
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,268
risky_shell_pipe.py
ansible_ansible-lint/src/ansiblelint/rules/risky_shell_pipe.py
"""Implementation of risky-shell-pipe rule.""" from __future__ import annotations import re import sys from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule from ansiblelint.utils import convert_to_boolean, get_cmd_args if TYPE_CHECKING: from ansiblelint.file_utils import Lintable f...
2,864
Python
.py
76
29.328947
83
0.614301
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,269
loop_var_prefix.py
ansible_ansible-lint/src/ansiblelint/rules/loop_var_prefix.py
"""Optional Ansible-lint rule to enforce use of prefix on role loop vars.""" from __future__ import annotations import re import sys from typing import TYPE_CHECKING from ansiblelint.config import LOOP_VAR_PREFIX, options from ansiblelint.rules import AnsibleLintRule from ansiblelint.text import toidentifier if TYP...
3,801
Python
.py
98
28.469388
155
0.587629
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,270
only_builtins.py
ansible_ansible-lint/src/ansiblelint/rules/only_builtins.py
"""Rule definition for usage of builtin actions only.""" from __future__ import annotations import os import sys from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule from ansiblelint.rules.fqcn import builtins from ansiblelint.skip_utils import is_nested_task if TYPE_CHECKING: from ans...
3,395
Python
.py
90
30.077778
93
0.640402
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,271
__init__.py
ansible_ansible-lint/src/ansiblelint/rules/__init__.py
"""All internal ansible-lint rules.""" from __future__ import annotations import copy import inspect import logging import re import sys from collections import defaultdict from collections.abc import Iterable, Iterator, MutableMapping, MutableSequence from importlib import import_module from pathlib import Path from...
21,851
Python
.py
517
31.226306
105
0.578157
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,272
meta_video_links.py
ansible_ansible-lint/src/ansiblelint/rules/meta_video_links.py
"""Implementation of meta-video-links rule.""" # Copyright (c) 2018, Ansible Project from __future__ import annotations import re import sys from typing import TYPE_CHECKING from ansiblelint.constants import FILENAME_KEY, LINE_NUMBER_KEY from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from colle...
4,159
Python
.py
103
28.84466
182
0.55539
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,273
playbook_extension.py
ansible_ansible-lint/src/ansiblelint/rules/playbook_extension.py
"""Implementation of playbook-extension rule.""" # Copyright (c) 2016, Tsukinowa Inc. <info@tsukinowa.jp> # Copyright (c) 2018, Ansible Project from __future__ import annotations import sys from typing import TYPE_CHECKING from ansiblelint.file_utils import Lintable from ansiblelint.rules import AnsibleLintRule from...
1,846
Python
.py
45
34.866667
83
0.680827
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,274
galaxy_version_incorrect.py
ansible_ansible-lint/src/ansiblelint/rules/galaxy_version_incorrect.py
"""Implementation of GalaxyVersionIncorrectRule.""" from __future__ import annotations import sys from functools import total_ordering from typing import TYPE_CHECKING, Any from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.errors import MatchError from ansiblelint.file_utils i...
3,783
Python
.py
88
35.056818
104
0.648133
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,275
args.py
ansible_ansible-lint/src/ansiblelint/rules/args.py
"""Rule definition to validate task options.""" from __future__ import annotations import contextlib import importlib.util import io import json import logging import re import sys from typing import TYPE_CHECKING, Any # pylint: disable=preferred-module from unittest import mock from unittest.mock import patch # py...
11,330
Python
.py
264
32.128788
206
0.59922
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,276
deprecated_local_action.py
ansible_ansible-lint/src/ansiblelint/rules/deprecated_local_action.py
"""Implementation for deprecated-local-action rule.""" # Copyright (c) 2016, Tsukinowa Inc. <info@tsukinowa.jp> # Copyright (c) 2018, Ansible Project from __future__ import annotations import copy import logging import os import sys from pathlib import Path from typing import TYPE_CHECKING from ansiblelint.rules imp...
4,584
Python
.py
108
32.694444
87
0.622671
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,277
sanity.py
ansible_ansible-lint/src/ansiblelint/rules/sanity.py
"""Implementation of sanity rule.""" from __future__ import annotations import re import sys from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule # Copyright (c) 2018, Ansible Project if TYPE_CHECKING: from ansiblelint.errors import MatchError from ansiblelint.file_utils import L...
5,489
Python
.py
139
25.964029
132
0.514189
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,278
no_same_owner.py
ansible_ansible-lint/src/ansiblelint/rules/no_same_owner.py
"""Optional rule for avoiding keeping owner/group when transferring files.""" from __future__ import annotations import re import sys from typing import TYPE_CHECKING, Any from ansible.utils.sentinel import Sentinel from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.file_utils imp...
3,594
Python
.py
95
29.073684
88
0.608396
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,279
schema.py
ansible_ansible-lint/src/ansiblelint/rules/schema.py
"""Rule definition for JSON Schema Validations.""" from __future__ import annotations import logging import re import sys from typing import TYPE_CHECKING, Any from ansiblelint.errors import MatchError from ansiblelint.file_utils import Lintable from ansiblelint.rules import AnsibleLintRule from ansiblelint.schemas....
14,383
Python
.py
385
24.397403
120
0.503975
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,280
command_instead_of_module.py
ansible_ansible-lint/src/ansiblelint/rules/command_instead_of_module.py
"""Implementation of command-instead-of-module rule.""" # Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
5,190
Python
.py
137
30.153285
90
0.627509
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,281
deprecated_bare_vars.py
ansible_ansible-lint/src/ansiblelint/rules/deprecated_bare_vars.py
"""Implementation of deprecated-bare-vars rule.""" # Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including ...
5,152
Python
.py
112
37.607143
194
0.651672
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,282
no_jinja_when.py
ansible_ansible-lint/src/ansiblelint/rules/no_jinja_when.py
"""Implementation of no-jinja-when rule.""" from __future__ import annotations import re import sys from typing import TYPE_CHECKING, Any from ansiblelint.constants import LINE_NUMBER_KEY from ansiblelint.rules import AnsibleLintRule, TransformMixin if TYPE_CHECKING: from ruamel.yaml.comments import CommentedMa...
4,368
Python
.py
107
30.121495
87
0.560217
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,283
run_once.py
ansible_ansible-lint/src/ansiblelint/rules/run_once.py
"""Optional Ansible-lint rule to warn use of run_once with strategy free.""" from __future__ import annotations import sys from typing import TYPE_CHECKING, Any from ansiblelint.constants import LINE_NUMBER_KEY from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.errors import MatchE...
3,138
Python
.py
80
30.7625
97
0.616902
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,284
empty_string_compare.py
ansible_ansible-lint/src/ansiblelint/rules/empty_string_compare.py
"""Implementation of empty-string-compare rule.""" # Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018, Ansible Project from __future__ import annotations import re import sys from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule from ansiblelint.yaml_utils import nested...
2,557
Python
.py
66
29.454545
86
0.599354
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,285
no_relative_paths.py
ansible_ansible-lint/src/ansiblelint/rules/no_relative_paths.py
"""Implementation of no-relative-paths rule.""" # Copyright (c) 2016, Tsukinowa Inc. <info@tsukinowa.jp> # Copyright (c) 2018, Ansible Project from __future__ import annotations import sys from typing import TYPE_CHECKING from ansiblelint.rules import AnsibleLintRule if TYPE_CHECKING: from ansiblelint.file_uti...
2,187
Python
.py
58
30.982759
99
0.645054
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,286
__init__.py
ansible_ansible-lint/src/ansiblelint/rules/custom/__init__.py
"""A placeholder package for putting custom rules under this dir."""
69
Python
.py
1
68
68
0.764706
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,287
rules.py
ansible_ansible-lint/src/ansiblelint/_internal/rules.py
"""Internally used rule classes.""" from __future__ import annotations import inspect import logging from pathlib import Path from typing import TYPE_CHECKING, Any from ansiblelint.constants import RULE_DOC_URL if TYPE_CHECKING: from ansiblelint.config import Options from ansiblelint.errors import MatchErro...
7,653
Python
.py
194
31.891753
105
0.618071
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,288
fixtures.py
ansible_ansible-lint/src/ansiblelint/testing/fixtures.py
"""PyTest Fixtures. They should not be imported, instead add code below to your root conftest.py file: pytest_plugins = ['ansiblelint.testing'] """ from __future__ import annotations from typing import TYPE_CHECKING import pytest from ansiblelint.config import Options from ansiblelint.constants import DEFAULT_RUL...
1,907
Python
.py
43
41.139535
82
0.778259
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,289
__init__.py
ansible_ansible-lint/src/ansiblelint/testing/__init__.py
"""Test utils for ansible-lint.""" from __future__ import annotations import os import shutil import subprocess import sys import tempfile from pathlib import Path from typing import TYPE_CHECKING, Any from ansiblelint.app import get_app if TYPE_CHECKING: # https://github.com/PyCQA/pylint/issues/3240 Comple...
4,790
Python
.py
138
27.289855
87
0.616847
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,290
__main__.py
ansible_ansible-lint/src/ansiblelint/schemas/__main__.py
"""Module containing cached JSON schemas.""" import json import logging import os import sys import time import urllib.request from collections import defaultdict from functools import cache from http.client import HTTPException from pathlib import Path from typing import Any from urllib.request import Request _logge...
4,440
Python
.py
106
32.349057
92
0.582812
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,291
main.py
ansible_ansible-lint/src/ansiblelint/schemas/main.py
"""Module containing cached JSON schemas.""" from __future__ import annotations import json import logging import re import typing from typing import TYPE_CHECKING import jsonschema import yaml from jsonschema.exceptions import ValidationError from ansiblelint.loaders import yaml_load_safe from ansiblelint.schemas....
4,024
Python
.py
99
30.232323
116
0.58199
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,292
module_with_relative_import.py
ansible_ansible-lint/collections/ansible_collections/local/testcollection/plugins/modules/module_with_relative_import.py
"""module_with_relative_import module.""" from ansible.module_utils.basic import AnsibleModule # pylint: disable=E0402 from ..module_utils import MY_STRING # noqa: TID252 # type: ignore[import-untyped] DOCUMENTATION = r""" options: name: required: True """ def main() -> AnsibleModule: """The main functi...
498
Python
.py
18
23.5
83
0.642706
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,293
__init__.py
ansible_ansible-lint/collections/ansible_collections/local/testcollection/plugins/module_utils/__init__.py
"""module_utils package.""" # Some value that can be imported from a module MY_STRING: str = "foo"
100
Python
.py
3
32
47
0.71875
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,294
fake_module.py
ansible_ansible-lint/plugins/modules/fake_module.py
"""Sample custom ansible module named fake_module. This is used to test ability to detect and use custom modules. """ from ansible.module_utils.basic import AnsibleModule EXAMPLES = r""" - name: "playbook" tasks: - name: Hello debug: msg: 'world' """ def main() -> None: """Return the module...
518
Python
.py
20
20.45
62
0.596349
ansible/ansible-lint
3,433
653
91
GPL-3.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,295
conf.py
landscapeio_prospector/docs/conf.py
# # Prospector documentation build configuration file, created by # sphinx-quickstart on Sun Sep 28 11:26:59 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration valu...
8,835
Python
.py
212
39.40566
86
0.713584
landscapeio/prospector
1,933
171
71
GPL-2.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,296
test_message.py
landscapeio_prospector/tests/test_message.py
from pathlib import Path from unittest import TestCase from prospector.message import Location class LocationPathTest(TestCase): def test_paths(self): """ Tests the absolute and relative path conversion """ root = Path(__file__).parent.parent loc = Location(__file__, "modu...
3,400
Python
.py
69
40.144928
94
0.598187
landscapeio/prospector
1,933
171
71
GPL-2.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,297
test_blender.py
landscapeio_prospector/tests/test_blender.py
from unittest import TestCase from prospector import blender from prospector.message import Location, Message class TestBlendLine(TestCase): BLEND = ( (("s1", "s1c01"), ("s2", "s2c12")), (("s3", "s3c81"), ("s1", "s1c04"), ("s2", "s2c44")), ) def _do_test(self, messages, expected): ...
2,419
Python
.py
60
32.216667
87
0.554891
landscapeio/prospector
1,933
171
71
GPL-2.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,298
utils.py
landscapeio_prospector/tests/utils.py
from __future__ import annotations import contextlib import sys from pathlib import Path from unittest.mock import patch from prospector.config import ProspectorConfig from prospector.run import Prospector @contextlib.contextmanager def patch_cli(*args: list[str], target: str = "sys.argv"): with patch(target, a...
2,243
Python
.py
54
35.222222
109
0.673554
landscapeio/prospector
1,933
171
71
GPL-2.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)
30,299
test_formatter_types.py
landscapeio_prospector/tests/formatters/test_formatter_types.py
import datetime from pathlib import Path import pytest from prospector.formatters import FORMATTERS from prospector.message import Location, Message from prospector.profiles.profile import ProspectorProfile @pytest.fixture def _simple_profile() -> ProspectorProfile: return ProspectorProfile(name="horse", profil...
1,593
Python
.py
40
32.775
110
0.659754
landscapeio/prospector
1,933
171
71
GPL-2.0
9/5/2024, 5:14:14 PM (Europe/Amsterdam)