-
Notifications
You must be signed in to change notification settings - Fork 50
Sync to linguist 7.2.0: heuristics.yml support #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+114,957
−84,118
Merged
Changes from 18 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
9c8053f
gen: small refactoring of generator.Documentation
bzz ac13a24
generator: godoc update
bzz d5b665b
gen: initial version of new content heuristics
bzz 6fd4849
gen: skip&report unsupported regexp syntax
bzz bbc27d5
sync \w Github Linguist v7.1.3
bzz 5505ed2
gen: adjust Ruby regexp syntax to RE2
bzz 3051773
gen: same alias/language name lookup as in linguist
bzz dceb95a
gen: fix regexp Or syntax
bzz df7844e
test: add test for content heuristics edge cases
bzz 6472714
gen: fix aliases case
bzz 43d1c6d
doc: update to currenet state
bzz 33bb5a6
test: update to expect names + .gold generation
bzz 2049da9
test: update *.gold results
bzz 63f3661
Apply suggestions from code review
creachadair 5fbadc8
Address review feedback
bzz 65b9545
test: fix nasty 'go test' exit code 0 on failing tests :/
bzz ef9311e
tests: document edge case and fix the tests
bzz fb61eaa
gen: add gold test restuls generation + docs sync better
bzz c57bc4a
gen: add missing GoDoc
bzz c4f3dbe
cleanup, addressing code review feedback
bzz 97ab29a
heuristics: refactoring, extracting rule package
bzz ec54891
review: remove indirection + expose Heuristic
bzz 191aa8c
gen: update generated code
bzz 6d601d6
review: do not export pattens
bzz bff3a15
review: nuke regexp dependency
bzz 3872cbd
rule: small godoc cleanup
bzz fc48fc4
sync \w linguist v7.2.0
bzz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# source{d} Contributing Guidelines | ||
|
||
source{d} projects accept contributions via GitHub pull requests. | ||
This document outlines some of the | ||
conventions on development workflow, commit message formatting, contact points, | ||
and other resources to make it easier to get your contribution accepted. | ||
|
||
## Certificate of Origin | ||
|
||
By contributing to this project, you agree to the [Developer Certificate of | ||
Origin (DCO)](DCO). This document was created by the Linux Kernel community and is a | ||
simple statement that you, as a contributor, have the legal right to make the | ||
contribution. | ||
|
||
In order to show your agreement with the DCO you should include at the end of the commit message, | ||
the following line: `Signed-off-by: John Doe <[email protected]>`, using your real name. | ||
|
||
This can be done easily using the [`-s`](https://github.com/git/git/blob/b2c150d3aa82f6583b9aadfecc5f8fa1c74aca09/Documentation/git-commit.txt#L154-L161) flag on the `git commit`. | ||
|
||
If you find yourself pushed a few commits without `Signed-off-by`, you can still add it afterwards. We wrote a manual which can help: [fix-DCO.md](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md). | ||
|
||
## Support Channels | ||
|
||
The official support channels, for both users and contributors, are: | ||
|
||
- GitHub issues: each repository has its own list of issues. | ||
- Slack: join the [source{d} Slack](https://join.slack.com/t/sourced-community/shared_invite/enQtMjc4Njk5MzEyNzM2LTFjNzY4NjEwZGEwMzRiNTM4MzRlMzQ4MmIzZjkwZmZlM2NjODUxZmJjNDI1OTcxNDAyMmZlNmFjODZlNTg0YWM) community. | ||
|
||
*Before opening a new issue or submitting a new pull request, it's helpful to | ||
search the project - it's likely that another user has already reported the | ||
issue you're facing, or it's a known issue that we're already aware of. | ||
|
||
|
||
## How to Contribute | ||
|
||
Pull Requests (PRs) are the main and exclusive way to contribute code to source{d} projects. | ||
In order for a PR to be accepted it needs to pass this list of requirements: | ||
|
||
- The contribution must be correctly explained with natural language and providing a minimum working example that reproduces it. | ||
- All PRs must be written idiomaticly: | ||
- for Go: formatted according to [gofmt](https://golang.org/cmd/gofmt/), and without any warnings from [go lint](https://github.com/golang/lint) nor [go vet](https://golang.org/cmd/vet/) | ||
- for other languages, similar constraints apply. | ||
- They should in general include tests, and those shall pass. | ||
- If the PR is a bug fix, it has to include a new unit test that fails before the patch is merged. | ||
- If the PR is a new feature, it has to come with a suite of unit tests, that tests the new functionality. | ||
- In any case, all the PRs have to pass the personal evaluation of at least one of the [maintainers](MAINTAINERS) of the project. | ||
|
||
|
||
### Format of the commit message | ||
|
||
Every commit message should describe what was changed, under which context and, if applicable, the GitHub issue it relates to: | ||
|
||
``` | ||
plumbing: packp, Skip argument validations for unknown capabilities. Fixes #623 | ||
``` | ||
|
||
The format can be described more formally as follows: | ||
|
||
``` | ||
<package>: <subpackage>, <what changed>. [Fixes #<issue-number>] | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,9 +28,6 @@ var ( | |
) | ||
|
||
func TestMain(m *testing.M) { | ||
var exitCode int | ||
defer os.Exit(exitCode) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You may also use anonymous function to still have defer: defer func(){
os.Exit(exitCode)
}() But in this case it's worth setting |
||
|
||
flag.BoolVar(&slow, "slow", false, "run benchmarks per sample for strategies too") | ||
flag.Parse() | ||
|
||
|
@@ -47,7 +44,7 @@ func TestMain(m *testing.M) { | |
log.Fatal(err) | ||
} | ||
|
||
exitCode = m.Run() | ||
os.Exit(m.Run()) | ||
} | ||
|
||
func cloneLinguist(linguistURL string) error { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.