Skip to content

Commit

Permalink
fix: fix syntax issue in annotation parser (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys authored Jun 22, 2024
1 parent 951f439 commit f1bd734
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
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

0 comments on commit f1bd734

Please sign in to comment.