-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds Git information to report, i.e. URL of remote, current commit ha…
…sh & branch and whether folder currently has changes relative to HEAD
- Loading branch information
Showing
4 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -11,6 +11,8 @@ import ( | |
type Project struct { | ||
// The project's assumed root directory, absolute path. | ||
Dir string | ||
// Information about the project's Git repository. | ||
Git GitInfo | ||
// mllint's configuration for this project | ||
Config config.Config | ||
// Type of mllint configuration | ||
|
@@ -23,6 +25,18 @@ type Project struct { | |
PythonFiles utils.Filenames | ||
} | ||
|
||
// GitInfo describes some info about the Git repository that a project is in. | ||
type GitInfo struct { | ||
// the URL of the Git remote, e.g. `[email protected]:bvobart/mllint.git` | ||
RemoteURL string | ||
// the hash of the current commit. | ||
Commit string | ||
// the name of the current branch. | ||
Branch string | ||
// whether the repository is currently in a dirty state (i.e. files added / removed / changed) | ||
Dirty bool | ||
} | ||
|
||
// ProjectReport is what you end up with after mllint finishes analysing a project. | ||
type ProjectReport struct { | ||
Project | ||
|
This file contains 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 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 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