Skip to content

Commit

Permalink
linguist: update .gitattributes for better linguist parsing (spack#20639
Browse files Browse the repository at this point in the history
)

This adds two lines to `.gitattributes`:
- [x] exclude vendored code from GitHub's language calculation
- [x] recognize `.lp` files as Prolog (closest language to ASP that
      linguist supports)

It looks like there have been two attempts
(github-linguist/linguist#3867,
github-linguist/linguist#4860) to add ASP as a language
to Linguist, but it's not widespread enough to be standard yet (or at
least the people who submitted the PRs haven't been able to show enough
stats to prove it). We'll settle for calling ASP "Prolog" for now as
that'll get us some syntax highlighting for `concretize.lp`.
  • Loading branch information
tgamblin authored Jan 1, 2021
1 parent a1cf000 commit 4d94c4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.py diff=python
*.lp linguist-language=Prolog
lib/spack/external/* linguist-vendored

0 comments on commit 4d94c4c

Please sign in to comment.