Skip to content

Commit 6e2e2c5

Browse files
committed
autofixes from Etherpad checkPlugins.js
1 parent f73983b commit 6e2e2c5

File tree

2 files changed

+148
-15
lines changed

2 files changed

+148
-15
lines changed

.travis.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -21,52 +21,52 @@ env:
2121

2222
jobs:
2323
include:
24-
- name: "Lint test package-lock"
25-
install:
24+
- name: "Lint test package-lock"
25+
install:
2626
- "npm install lockfile-lint"
27-
script:
27+
script:
2828
- npx lockfile-lint --path package-lock.json --validate-https --allowed-hosts npm
29-
- name: "Run the Backend tests"
30-
before_script:
29+
- name: "Run the Backend tests"
30+
before_script:
3131
- "tests/frontend/travis/sauce_tunnel.sh"
32-
before_install:
32+
before_install:
3333
- sudo add-apt-repository -y ppa:libreoffice/ppa
3434
- sudo apt-get update
3535
- sudo apt-get -y install libreoffice
3636
- sudo apt-get -y install libreoffice-pdfimport
37-
install:
37+
install:
3838
- "npm install"
3939
- "mkdir ep_hash_auth"
4040
- "mv !(ep_hash_auth) ep_hash_auth"
4141
- "git clone https://github.com/ether/etherpad-lite.git etherpad"
4242
- "cd etherpad"
43-
- "mkdir node_modules"
43+
- "mkdir -p node_modules"
4444
- "mv ../ep_hash_auth node_modules"
4545
- "bin/installDeps.sh"
4646
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
4747
- "cd src && npm install && cd -"
48-
script:
48+
script:
4949
- "tests/frontend/travis/runnerBackend.sh"
50-
- name: "Test the Frontend"
51-
before_script:
50+
- name: "Test the Frontend"
51+
before_script:
5252
- "tests/frontend/travis/sauce_tunnel.sh"
53-
install:
53+
install:
5454
- "npm install"
5555
- "mkdir ep_hash_auth"
5656
- "mv !(ep_hash_auth) ep_hash_auth"
5757
- "git clone https://github.com/ether/etherpad-lite.git etherpad"
5858
- "cd etherpad"
59-
- "mkdir node_modules"
59+
- "mkdir -p node_modules"
6060
- "mv ../ep_hash_auth node_modules"
6161
- "bin/installDeps.sh"
6262
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
63-
script:
63+
script:
6464
- "tests/frontend/travis/runner.sh"
6565

6666
notifications:
6767
irc:
6868
channels:
6969
- "irc.freenode.org#etherpad-lite-dev"
7070

71-
##ETHERPAD_TRAVIS_V=7
71+
##ETHERPAD_TRAVIS_V=8
7272
## Travis configuration automatically created using bin/plugins/updateAllPluginsScript.sh

CONTRIBUTING.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Contributor Guidelines
2+
(Please talk to people on the mailing list before you change this page, see our section on [how to get in touch](https://github.com/ether/etherpad-lite#get-in-touch))
3+
4+
## Pull requests
5+
6+
* the commit series in the PR should be _linear_ (it **should not contain merge commits**). This is necessary because we want to be able to [bisect](https://en.wikipedia.org/wiki/Bisection_(software_engineering)) bugs easily. Rewrite history/perform a rebase if necessary
7+
* PRs should be issued against the **develop** branch: we never pull directly into **master**
8+
* PRs **should not have conflicts** with develop. If there are, please resolve them rebasing and force-pushing
9+
* when preparing your PR, please make sure that you have included the relevant **changes to the documentation** (preferably with usage examples)
10+
* contain meaningful and detailed **commit messages** in the form:
11+
```
12+
submodule: description
13+
14+
longer description of the change you have made, eventually mentioning the
15+
number of the issue that is being fixed, in the form: Fixes #someIssueNumber
16+
```
17+
* if the PR is a **bug fix**:
18+
* the first commit in the series must be a test that shows the failure
19+
* subsequent commits will fix the bug and make the test pass
20+
* the final commit message should include the text `Fixes: #xxx` to link it to its bug report
21+
* think about stability: code has to be backwards compatible as much as possible. Always **assume your code will be run with an older version of the DB/config file**
22+
* if you want to remove a feature, **deprecate it instead**:
23+
* write an issue with your deprecation plan
24+
* output a `WARN` in the log informing that the feature is going to be removed
25+
* remove the feature in the next version
26+
* if you want to add a new feature, put it under a **feature flag**:
27+
* once the new feature has reached a minimal level of stability, do a PR for it, so it can be integrated early
28+
* expose a mechanism for enabling/disabling the feature
29+
* the new feature should be **disabled** by default. With the feature disabled, the code path should be exactly the same as before your contribution. This is a __necessary condition__ for early integration
30+
* think of the PR not as something that __you wrote__, but as something that __someone else is going to read__. The commit series in the PR should tell a novice developer the story of your thoughts when developing it
31+
32+
## How to write a bug report
33+
34+
* Please be polite, we all are humans and problems can occur.
35+
* Please add as much information as possible, for example
36+
* client os(s) and version(s)
37+
* browser(s) and version(s), is the problem reproducible on different clients
38+
* special environments like firewalls or antivirus
39+
* host os and version
40+
* npm and nodejs version
41+
* Logfiles if available
42+
* steps to reproduce
43+
* what you expected to happen
44+
* what actually happened
45+
* Please format logfiles and code examples with markdown see github Markdown help below the issue textarea for more information.
46+
47+
If you send logfiles, please set the loglevel switch DEBUG in your settings.json file:
48+
49+
```
50+
/* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
51+
"loglevel": "DEBUG",
52+
```
53+
54+
The logfile location is defined in startup script or the log is directly shown in the commandline after you have started etherpad.
55+
56+
## General goals of Etherpad
57+
To make sure everybody is going in the same direction:
58+
* easy to install for admins and easy to use for people
59+
* easy to integrate into other apps, but also usable as standalone
60+
* lightweight and scalable
61+
* extensible, as much functionality should be extendable with plugins so changes don't have to be done in core.
62+
Also, keep it maintainable. We don't wanna end up as the monster Etherpad was!
63+
64+
## How to work with git?
65+
* Don't work in your master branch.
66+
* Make a new branch for every feature you're working on. (This ensures that you can work you can do lots of small, independent pull requests instead of one big one with complete different features)
67+
* Don't use the online edit function of github (this only creates ugly and not working commits!)
68+
* Try to make clean commits that are easy readable (including descriptive commit messages!)
69+
* Test before you push. Sounds easy, it isn't!
70+
* Don't check in stuff that gets generated during build or runtime
71+
* Make small pull requests that are easy to review but make sure they do add value by themselves / individually
72+
73+
## Coding style
74+
* Do write comments. (You don't have to comment every line, but if you come up with something that's a bit complex/weird, just leave a comment. Bear in mind that you will probably leave the project at some point and that other people will read your code. Undocumented huge amounts of code are worthless!)
75+
* Never ever use tabs
76+
* Indentation: JS/CSS: 2 spaces; HTML: 4 spaces
77+
* Don't overengineer. Don't try to solve any possible problem in one step, but try to solve problems as easy as possible and improve the solution over time!
78+
* Do generalize sooner or later! (if an old solution, quickly hacked together, poses more problems than it solves today, refactor it!)
79+
* Keep it compatible. Do not introduce changes to the public API, db schema or configurations too lightly. Don't make incompatible changes without good reasons!
80+
* If you do make changes, document them! (see below)
81+
* Use protocol independent urls "//"
82+
83+
## Branching model / git workflow
84+
see git flow http://nvie.com/posts/a-successful-git-branching-model/
85+
86+
### `master` branch
87+
* the stable
88+
* This is the branch everyone should use for production stuff
89+
90+
### `develop`branch
91+
* everything that is READY to go into master at some point in time
92+
* This stuff is tested and ready to go out
93+
94+
### release branches
95+
* stuff that should go into master very soon
96+
* only bugfixes go into these (see http://nvie.com/posts/a-successful-git-branching-model/ for why)
97+
* we should not be blocking new features to develop, just because we feel that we should be releasing it to master soon. This is the situation that release branches solve/handle.
98+
99+
### hotfix branches
100+
* fixes for bugs in master
101+
102+
### feature branches (in your own repos)
103+
* these are the branches where you develop your features in
104+
* If it's ready to go out, it will be merged into develop
105+
106+
Over the time we pull features from feature branches into the develop branch. Every month we pull from develop into master. Bugs in master get fixed in hotfix branches. These branches will get merged into master AND develop. There should never be commits in master that aren't in develop
107+
108+
## Documentation
109+
The docs are in the `doc/` folder in the git repository, so people can easily find the suitable docs for the current git revision.
110+
111+
Documentation should be kept up-to-date. This means, whenever you add a new API method, add a new hook or change the database model, pack the relevant changes to the docs in the same pull request.
112+
113+
You can build the docs e.g. produce html, using `make docs`. At some point in the future we will provide an online documentation. The current documentation in the github wiki should always reflect the state of `master` (!), since there are no docs in master, yet.
114+
115+
## Testing
116+
Front-end tests are found in the `tests/frontend/` folder in the repository. Run them by pointing your browser to `<yourdomainhere>/tests/frontend`.
117+
118+
Back-end tests can be run from the `src` directory, via `npm test`.
119+
120+
## Things you can help with
121+
Etherpad is much more than software. So if you aren't a developer then worry not, there is still a LOT you can do! A big part of what we do is community engagement. You can help in the following ways
122+
* Triage bugs (applying labels) and confirming their existence
123+
* Testing fixes (simply applying them and seeing if it fixes your issue or not) - Some git experience required
124+
* Notifying large site admins of new releases
125+
* Writing Changelogs for releases
126+
* Creating Windows packages
127+
* Creating releases
128+
* Bumping dependencies periodically and checking they don't break anything
129+
* Write proposals for grants
130+
* Co-Author and Publish CVEs
131+
* Work with SFC to maintain legal side of project
132+
* Maintain TODO page - https://github.com/ether/etherpad-lite/wiki/TODO#IMPORTANT_TODOS
133+

0 commit comments

Comments
 (0)