Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix syntax issue in annotation parser #725

Merged
merged 4 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dictionary
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ ansible-.+
toc
GPL-3.0
(P|p)re-(C|c)ommit
JSON
2 changes: 1 addition & 1 deletion ansibledoctor/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _get_annotation_data(self, num, line, name, rfile):

if parts[2] not in multiline_char and parts[2].startswith("$"):
source = parts[2].replace("$", "").strip()
content = self._str_to_json(key, source, rfile, num, line)
content = self._str_to_json(key, source, rfile, num)

item.data[key][parts[1]] = content

Expand Down
2 changes: 1 addition & 1 deletion ansibledoctor/doc_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _parse_task_tags(self):

tags = []
for task in raw:
task_tags = task.get("tags")
task_tags = task.get("tags", [])
if isinstance(task_tags, str):
task_tags = [task_tags]

Expand Down
8 changes: 6 additions & 2 deletions docs/content/usage/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,15 @@ options:

## Environment Variables

{{< hint type=note >}}
List configuration options need to be passed as JSON strings.
{{< /hint >}}

```Shell
ANSIBLE_DOCTOR_BASE_DIR=
ANSIBLE_DOCTOR_DRY_RUN=False
ANSIBLE_DOCTOR_EXCLUDE_FILES=
ANSIBLE_DOCTOR_EXCLUDE_TAGS=
ANSIBLE_DOCTOR_EXCLUDE_FILES="['molecule/']"
ANSIBLE_DOCTOR_EXCLUDE_TAGS="[]"

ANSIBLE_DOCTOR_ROLE__NAME=
ANSIBLE_DOCTOR_ROLE__AUTODETECT=True
Expand Down