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: CONTRIBUTING.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,12 @@ Why for nomral use it is ok to call `go get` without go modules, if you are goin
8
8

9
9
10
10
Main things to consider when implementing new functionality is packages, there are 3:
11
-
*`core` - this is the true godu. Everything that does the main job is here. If godu wasn't CLI utility but GUI app, this package would ideally stay untouched
11
+
*`files` - godu's file system representation and algorythms for making and changing the file tree structure
12
+
*`commands` - application state representation and functions to change it, all based on the command design pattern
12
13
*`interactive` - this is functionality connected to UI of the app
13
14
*`main` - this contains main wiring + tcell.Screen related functionality, **this is the only package that is not expected to have 100% test coverage**
14
15
15
-
#### Before doing significant changes to core (specially changing the main structures like File and State, please consult the change in form of Github Issue
16
+
#### Before doing significant changes to `files` and `commands` packages (specially changing the main structures like File and State, please consult the change in form of Github Issue
16
17
17
18
## Main ideas
18
19
### State is immutable
@@ -22,12 +23,12 @@ Main things to consider when implementing new functionality is packages, there a
22
23
### the root folder structure should only represent the file system
23
24
You would notice that in `godu.go` we are walking through the whole folder using
The expectation is that the `core.File` structure contains only representation of the file system and it is not going to change after calling `WalkFolder`
28
+
The expectation is that the `files.File` structure contains only representation of the file system and it is not going to change after calling `WalkFolder`
28
29
29
30
### Everything that commands do should be represented in State
30
31
When implementing new command please make sure that it's result is captured in a state and that the state is appropriately displayed using `InteractiveFolder` (e.g. highlighting selected line in file column)
31
32
32
33
## 100% test coverage
33
-
Expectation is that `core` and `interactive` packages will have 100% test coverage. I'm not a testing nazi but I won't have time to checkout every PR and manually retest it and neither will you. We need to be confident that `godu` still works after merging your (and any subsequent) PR.
34
+
Expectation is that `files`, `commands` and `interactive` packages will have 100% test coverage. I'm not a testing nazi but I won't have time to checkout every PR and manually retest it and neither will you. We need to be confident that `godu` still works after merging your (and any subsequent) PR.
0 commit comments