Skip to content

Commit

Permalink
use xml lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wandmagic committed Jan 16, 2025
1 parent f6bea01 commit 2d12b10
Show file tree
Hide file tree
Showing 6 changed files with 33,825 additions and 221 deletions.
12,834 changes: 12,761 additions & 73 deletions dist/content/rev5/baselines/xml/FedRAMP_rev5_HIGH-baseline_profile.xml

Large diffs are not rendered by default.

2,715 changes: 2,709 additions & 6 deletions dist/content/rev5/baselines/xml/FedRAMP_rev5_LI-SaaS-baseline_profile.xml

Large diffs are not rendered by default.

7,304 changes: 7,235 additions & 69 deletions dist/content/rev5/baselines/xml/FedRAMP_rev5_LOW-baseline_profile.xml

Large diffs are not rendered by default.

11,177 changes: 11,105 additions & 72 deletions dist/content/rev5/baselines/xml/FedRAMP_rev5_MODERATE-baseline_profile.xml

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/content/module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ DIST_DIR = ./dist
XML_DIR = $(DIST_DIR)/content/rev5/baselines/xml
JSON_DIR = $(DIST_DIR)/content/rev5/baselines/json
YAML_DIR = $(DIST_DIR)/content/rev5/baselines/yaml
XMLLINT := $(shell command -v xmllint 2>/dev/null || command -v /usr/bin/xmllint 2>/dev/null || command -v /mingw64/bin/xmllint 2>/dev/null)

# Format configuration
XML_FILES := $(shell find $(XML_DIR) -type f -name "*.xml" 2>/dev/null)
Expand All @@ -19,6 +20,8 @@ init-content:
$(OSCAL_CLI) use $(OSCAL_CLI_VERSION)
$(OSCAL_CLI) server update
$(OSCAL_CLI) server start -bg
@(command -v xmllint >/dev/null 2>&1 || (command -v apt-get >/dev/null 2>&1 && sudo apt-get install -y libxml2-utils) || (command -v brew >/dev/null 2>&1 && brew install libxml2) || (command -v choco >/dev/null 2>&1 && choco install xsltproc) || echo "Please install xmllint manually")


# Generate content and perform conversions
.PHONY: build-content
Expand Down Expand Up @@ -54,7 +57,7 @@ format-xml:
@echo "Formatting XML files..."
@for file in $(XML_FILES); do \
echo "Formatting $$file..."; \
xmllint --format --output "$$file" "$$file"; \
$(XMLLINT) --format --output "$$file" "$$file"; \
done

.PHONY: format-json
Expand Down

0 comments on commit 2d12b10

Please sign in to comment.