Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreipol/codestyle
Improve your code style!
https://github.com/dreipol/codestyle
Last synced: 7 days ago
JSON representation
Improve your code style!
- Host: GitHub
- URL: https://github.com/dreipol/codestyle
- Owner: dreipol
- Created: 2016-01-08T14:00:55.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-11-13T09:53:39.000Z (about 1 year ago)
- Last Synced: 2023-11-13T10:45:02.860Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 22
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# codestyle
This repo contains the code styles for all JetBrains based IDEs used at dreipol## Import instructions
- Open your IDE
- Choose Menu File > Import Settings
- Select the jar for your IDE## IDE settings
### PyCharm
pycharm.jar#### Formatting
- 120 chars line width
- Default Python settings
- dreipol drontend (JS/CSS/HTML) formatting#### Macros
- reformat_and_save: Rearranges, reformats and organizes imports, then saves the file### Android Studio
android_studio.jar#### Formatting
- Spaces instead of tabs
- Code Arrangement and field prefixes
- Method and Field arrangement
- XML Linebreaks#### Macros
- reformat_and_save: Rearranges, reformats and organizes imports, then saves the file### AppCode
appcode.jar#### Formatting
- Spaces instead of tabs
- Code Arrangement
- Method and Field arrangement#### Macros
- reformat_and_save: Reformats, indents and organizes imports, then saves the file# commit hooks
## prepare-commit-msg
Prefixes your git commit message with the name of the current branch.
You can link the script by executing the following commands:
```
chmod a+x ~/Documents/Repositories/codestyle/git-templates/hooks/prepare-commit-msg
mkdir ~/Documents/Repositories/[REPOSITORY]/.git/hooks
ln -s ~/Documents/Repositories/codestyle/git-templates/hooks/prepare-commit-msg ~/Documents/Repositories/[REPOSITORY]/.git/hooks/prepare-commit-msg
```
or you can change your global config to use the template folder from codestyle:
```
git config --global init.templatedir '~/Documents/Repositories/codestyle/git-templates'
```
New repositories will have the hooks automatically. For existing repositories, you have to `git init` in the repository to add the templates.
Please note that if the hook-script changes you'll have to do the following: `rm -f .git/hooks/prepare-commit-msg && git init`