You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
7
7
## [Unreleased]
8
8
9
+
### Changed
10
+
11
+
- When it's added the `-v` verbose flag, gitbase will use `debug` as logging level, ignoring any other passed ([#935](https://github.com/src-d/gitbase/pull/935))
12
+
13
+
### Fixed
14
+
15
+
- If using docker image, and `info` logging level, it will be now used instead of `debug` ([#935](https://github.com/src-d/gitbase/pull/935))
Copy file name to clipboardExpand all lines: cmd/gitbase/command/server.go
+13-6Lines changed: 13 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -83,8 +83,8 @@ type Server struct {
83
83
MetricsPortint`long:"metrics-port" env:"GITBASE_METRICS_PORT" default:"2112" description:"Port where the server is going to expose prometheus metrics"`
84
84
ReadOnlybool`short:"r" long:"readonly" description:"Only allow read queries. This disables creating and deleting indexes as well. Cannot be used with --user-file." env:"GITBASE_READONLY"`
85
85
SkipGitErrorsbool// SkipGitErrors disables failing when Git errors are found.
86
-
Verbosebool`short:"v" description:"Activates the verbose mode"`
Copy file name to clipboardExpand all lines: docs/using-gitbase/functions.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,6 +169,26 @@ Also, if you want to retrieve values from a non common property, you can pass it
169
169
170
170
> uast_extract(nodes_column, 'some-property')
171
171
172
+
## How to use `loc`
173
+
174
+
`loc` will return statistics about the lines of code in a file, such as the code lines, comment lines, etc.
175
+
176
+
It requires a file path and a file content.
177
+
178
+
> loc(file_path, blob_content)
179
+
180
+
The result of this function is a JSON document with the following shape:
181
+
182
+
```
183
+
{
184
+
"Code": code lines,
185
+
"Comment": comment lines,
186
+
"Blank": blank lines,
187
+
"Name": file name,
188
+
"Lang": language
189
+
}
190
+
```
191
+
172
192
## How to use `commit_file_stats`
173
193
174
194
`commit_file_stats` will return statistics about the line changes in all files in the given range of commits classifying them in 4 categories: code, comments, blank lines and other.
0 commit comments