Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/CI_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: 🏃 Validate json and rebuild udl-list.md
working-directory: .
run: python .validators\validator_json.py
run: python .validators\validator_json.py --output-md

- name: 🔨 Generate autoCompletion for all UDLs that don't already have one, and revalidate (primary repo + branch only)
working-directory: .
Expand All @@ -48,7 +48,7 @@ jobs:
# since AC XML may have been added, re-validate XML
python .validators\validator_xml.py
# since AC may have been added to JSON, need to revalidate JSON and re-generate md
python .validators\validator_json.py
python .validators\validator_json.py --output-md

- name: 🎉 Update repo with automated changes for the UDL list and autoCompletions
uses: stefanzweifel/git-auto-commit-action@v7
Expand Down
13 changes: 11 additions & 2 deletions .validators/validator_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
from lxml import etree
from glob import glob

import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-o", "--output-md", help="output new copy of udl-list.md", action="store_true")
args = parser.parse_args()

api_url = os.environ.get('APPVEYOR_API_URL')
has_error = False
Expand Down Expand Up @@ -605,8 +609,13 @@ def parse(filename):
check_for_orphans(udl_file_structure)

# update markdown file
with open("udl-list.md", "w", encoding="utf8") as md_file:
md_file.write(gen_md_table(udl_file_structure))
if args.output_md:
with open("udl-list.md", "w", encoding="utf8") as md_file:
md_file.write(gen_md_table(udl_file_structure))
else:
print("\r\nNot generating Markdown table")
print("* Run with --output-md option to generate udl-list.md")
print("* This is done automatically when a PR is merged, so\n normal contributors don't need to run with this option")

if has_error:
print('\r\nSummary of Errors:')
Expand Down
18 changes: 16 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ The goal of this Collection is to provide a UDL center for users who need the pr

You may also optionally submit an Auto-Completion definition and/or a Function List definition to go with your UDL (or to go with someone else's UDL).

To submit a UDL and/or autoCompletion definition and/or functionList definition, you have to modify [udl-list.json](https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/udl-list.json), then submit a Pull Request to add it to the Collection. The team will review your submission, and either merge it into the Collection, ask for clarification or fixes, or reject the submission.
To submit a UDL and/or autoCompletion definition and/or functionList definition, you have to modify [udl-list.json](https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/udl-list.json), then submit a Pull Request to add it to the Collection. The team will review your submission, and either merge it into the Collection, ask for clarification or fixes, or reject the submission.

**Do _not_ edit [udl-list.md](https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/udl-list.md): that file is auto-generated from the JSON to save effort and maintain consistency.**

Expand Down Expand Up @@ -36,7 +36,7 @@ To be accepted, your submission _must_ meet the following **requirement**s and _
- **requirement**: if you are supplying a function list definition XML file, it must go in the `functionList` directory
- **requirement**: if you are supplying a sample file, it must go in the `UDL-samples` directory
11. **requirement**: submissions to the UDL Collection must pass all automated tests.
- If the PR action does not pass, you will be required to fix the problem in a timely fashion, or the PR can and will be rejected.
- If the PR action does not pass, you will be required to fix the problem in a timely fashion, or the PR can and will be rejected.
- Do not just submit the PR then never come back to check the status.
- Look for notifications (emails or website notifications) from GitHub: it might be informing you of a failure, or letting you know that one of the maintenance team has replied to your PR.

Expand Down Expand Up @@ -121,3 +121,17 @@ There will be automatic validation and verification of some of these requirement
If you do not resolve the errors (or other fixes requested by the maintenance team) or at least ask for help, the maintenance team is allowed to close a PR after a week without you resolving the errors (or a week of you not replying to their most recent comment, if there has been a conversation regarding the errors).

The maintenance team have the decision power as to whether or not a given PR is accepted or rejected. If it is rejected for reasons other than validation errors or failure, they must explain their reasoning in the PR conversation.

### Validating before submitting PR

If you have python available, it is _highly_ recommended that you validate your updates and make them pass _before_ submitting the PR, by running the following:

```
python -m pip install -r requirements.txt
python .validators\validator_xml.py
python .validators\validator_json.py
```

Warnings are okay, but if there are any errors, you can fix them _before_ you submit a PR, which will make the PR acceptance go more smoothly.

Thank you.
2 changes: 1 addition & 1 deletion udl-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -3893,4 +3893,4 @@
"autoCompletionAuthor": "generate_ac.py"
}
]
}
}