Skip to content

Commit

Permalink
refactor(parser): remove unused grammar rule (#753)
Browse files Browse the repository at this point in the history
also, use same check rules for Golang CI
on CLI vs on GitHub Actions.

Signed-off-by: Xavier Coulon <[email protected]>
  • Loading branch information
xcoulon authored Sep 6, 2020
1 parent 4fd36b5 commit 7a90b4e
Show file tree
Hide file tree
Showing 5 changed files with 536 additions and 604 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ linters:
- govet
- gocyclo
- unused
- gofmt
- golint
- misspell
enable-all: false
disable:
- maligned
Expand Down
5 changes: 2 additions & 3 deletions pkg/parser/document_processing_apply_substitutions.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,8 @@ var (
substituteAttributesFunc = elementsSubstitutionWithPlaceholders("AttributesSubstitution") // TODO: include with applyAttributeSubstitutionsOnElementsFunc?
substituteReplacementsFunc = elementsSubstitutionWithPlaceholders("ReplacementsSubstitution")
substituteInlineMacrosFunc = elementsSubstitutionWithPlaceholders("InlineMacrosSubstitution") // elementsSubstitution("InlineMacrosSubstitution")
// substituteQuotedTextAndInlineMacrosFunc = elementsSubstitution("QuotedTextAndInlineMacrosSubstitution")
substitutePostReplacementsFunc = elementsSubstitutionWithPlaceholders("PostReplacementsSubstitution")
substituteNothingFunc = elementsSubstitution("NoneSubstitution")
substitutePostReplacementsFunc = elementsSubstitutionWithPlaceholders("PostReplacementsSubstitution")
substituteNothingFunc = elementsSubstitution("NoneSubstitution")
)

func elementsSubstitution(ruleName string) elementsSubstitutionFunc {
Expand Down
2 changes: 1 addition & 1 deletion pkg/parser/generate.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package parser

//go:generate pigeon -optimize-parser -alternate-entrypoints AsciidocRawDocument,RawFile,TextDocument,DocumentRawBlock,FileLocation,IncludedFileLine,InlineLinks,LabeledListItemTerm,NormalBlockContentSubstitution,VerseBlockContentSubstitution,MarkdownQuoteBlockAttribution,InlineElements,QuotedTextSubstitution,NoneSubstitution,AttributesSubstitution,ReplacementsSubstitution,PostReplacementsSubstitution,QuotedTextAndInlineMacrosSubstitution,InlinePassthroughSubstitution -o parser.go parser.peg
//go:generate pigeon -optimize-parser -alternate-entrypoints AsciidocRawDocument,RawFile,TextDocument,DocumentRawBlock,FileLocation,IncludedFileLine,InlineLinks,LabeledListItemTerm,NormalBlockContentSubstitution,VerseBlockContentSubstitution,MarkdownQuoteBlockAttribution,InlineElements,QuotedTextSubstitution,NoneSubstitution,AttributesSubstitution,ReplacementsSubstitution,PostReplacementsSubstitution,InlinePassthroughSubstitution -o parser.go parser.peg
Loading

0 comments on commit 7a90b4e

Please sign in to comment.