-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Language statistics bar for repositories #4824
Conversation
9ddb20a
to
2d35342
Compare
We are waiting on you 😉 😉 |
should fix #2165 |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
😢😢😢😢 |
Can this support adding own languages via some kind of configuration, e.g. by extension-to-name mapping? |
@MarkusAmshove why not add new languages upstream? |
Because they are internal self written languages, think about e.g. DSLs. Edit: I don't know how linguistic works, but if the gitattributes files allows to have "new" languages in them, and the go implementation copies that, it will work out of the box. |
@MarkusAmshove I'd prefer it if this pr would be merged without your feature request and then a second one after this one with the feature. Makes it easier to review :) |
No problemo :-) |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
I will work on this a bit later :) |
2d35342
to
4f41a29
Compare
faba95c
to
d1dcced
Compare
a706c21
to
109a0c6
Compare
109a0c6
to
e4146ff
Compare
e4146ff
to
93549f0
Compare
models/migrations/v93.go
Outdated
Language string `xorm:"VARCHAR(30) UNIQUE(s) INDEX NOT NULL"` | ||
Percentage float32 `xorm:"NUMERIC(4,2) NOT NULL DEFAULT 0"` | ||
Color string `xorm:"-"` | ||
CreatedUnix util.TimeStamp `xorm:"INDEX CREATED"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to use code.gitea.io/gitea/modules/timeutil
to reference TimeStamp
b790a21
to
f1c4148
Compare
Codecov Report
@@ Coverage Diff @@
## master #4824 +/- ##
=======================================
Coverage 41.59% 41.59%
=======================================
Files 480 480
Lines 64144 64144
=======================================
Hits 26680 26680
Misses 34004 34004
Partials 3460 3460 Continue to review full report at Codecov.
|
Fixes #2165
Implements language statistic calculation using https://github.com/src-d/enry library.
TODO:
(cleanup depends on Implement getting HTML color code for languages src-d/enry#233)Add support for(this could be added later in other PR)linguist-vendored
in.gitattributes
fileScreenshots: