Skip to content

Commit

Permalink
Backport #347 and #390 to 1.0: Generator for asciidoc representation …
Browse files Browse the repository at this point in the history
…of all ECS fields (#347) (#392)

This code generates both the index page for the fields section, and the detailed page for each fieldset.

Also in this PR:

- If `short` not set, copy `definition` to it
- If `short` contains \n, fail. Beginning of an ECS linter.
- Beef up the local file imports in tests.
  - autopep8 ignore E402, in order to leave local imports alone
- Create generators/ecs_helpers.py, to start reusing functionality beween generators
  • Loading branch information
webmat authored Mar 21, 2019
1 parent b9f735d commit c899ce8
Show file tree
Hide file tree
Showing 20 changed files with 3,769 additions and 550 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* New generator that supports reusable fields, for files based on ECS.
It generates schema.csv, Elasticsearch 6 and 7 templates, and field documentation
for the main website. #336
* Generator for the asciidoc rendering of field definitions. #347
* Generator for the Beats fields.ecs.yml file. #379

### Improvements
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fields:
# Format code and files in the repo.
.PHONY: fmt
fmt: ve
$(FIND) -name '*.py' -exec build/ve/bin/autopep8 --in-place --max-line-length 120 {} \;
$(FIND) -name '*.py' -exec build/ve/bin/autopep8 --ignore E402 --in-place --max-line-length 120 {} \;
go get golang.org/x/tools/cmd/goimports
goimports -w -l -local github.com/elastic $(shell $(FIND) -name '*.go')

Expand Down
Loading

0 comments on commit c899ce8

Please sign in to comment.