Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Now emits newlines at the end of imports and includes

Signed-off-by: Luca Corbatto <[email protected]>
  • Loading branch information
targodan authored Dec 9, 2021
1 parent 8432d53 commit 3239346
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ast/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ func (r *Rule) WriteSource(w io.Writer) error {
// WriteSource writes the ruleset's source into the writer w.
func (r *RuleSet) WriteSource(w io.Writer) error {
for _, imp := range r.Imports {
if _, err := fmt.Fprintf(w, `import "%s"`, imp); err != nil {
if _, err := fmt.Fprintf(w, "import \"%s\"\n", imp); err != nil {
return err
}
}
for _, inc := range r.Includes {
if _, err := fmt.Fprintf(w, `include "%s"`, inc); err != nil {
if _, err := fmt.Fprintf(w, "include \"%s\"\n", inc); err != nil {
return err
}
}
Expand Down

0 comments on commit 3239346

Please sign in to comment.