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

validate conf.json #4051

Merged
merged 31 commits into from Feb 28, 2024
Merged

validate conf.json #4051

merged 31 commits into from Feb 28, 2024

Conversation

dorschw
Copy link
Contributor

@dorschw dorschw commented Feb 18, 2024

Related Issues

fixes: https://jira-dc.paloaltonetworks.com/browse/CIAC-9228

Description

Adding the validate-conf-json pre-commit hook, checking:

  • Structure of conf.json
  • All IDs mentioned in conf.json are valid and are in the graph

@coveralls
Copy link
Collaborator

coveralls commented Feb 18, 2024

Pull Request Test Coverage Report for Build 8077073676

Details

  • -1 of 145 (99.31%) changed or added relevant lines in 2 files are covered.
  • 8 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+11.4%) to 92.125%

Changes Missing Coverage Covered Lines Changed/Added Lines %
demisto_sdk/commands/content_graph/objects/conf_json.py 96 97 98.97%
Files with Coverage Reduction New Missed Lines %
demisto_sdk/commands/content_graph/neo4j_service.py 3 95.92%
demisto_sdk/commands/content_graph/commands/common.py 5 58.82%
Totals Coverage Status
Change from base Build d1e3ec4f-9000-4872-b0ff-26db747d0a8f: 11.4%
Covered Lines: 58114
Relevant Lines: 63082

💛 - Coveralls

@dorschw dorschw mentioned this pull request Feb 25, 2024
Copy link
Contributor

@yuvalbenshalom yuvalbenshalom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. see my questions.

version: -1
name: Cortex XDR Incident Handling
name: Cortex_XDR_Incident_Handling
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is intended? because the example in the repo is with spaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces are allowed, but in the unit tests we need the underscores

demisto_sdk/scripts/validate_conf_json.py Outdated Show resolved Hide resolved
@dorschw dorschw merged commit 1da7fea into master Feb 28, 2024
34 checks passed
@dorschw dorschw deleted the ds-conf-json-2 branch February 28, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants