Add pre-commit

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2021-01-25 12:19:56 +01:00
parent 595b300a29
commit cc174d843e
No known key found for this signature in database
GPG key ID: 332171FADF1DB90B
28 changed files with 41 additions and 34 deletions

19
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,19 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/prettier/pre-commit
rev: v2.1.2
hooks:
- id: prettier
- repo: https://github.com/ansible/ansible-lint.git
rev: v4.2.0
hooks:
- id: ansible-lint
files: \.(yaml|yml)$

View file

@ -1,7 +1,7 @@
---
- name: Upgrade all packages
dnf:
name: '*'
name: "*"
state: latest
- name: Install playerctl and flameshot
@ -12,4 +12,4 @@
state: present
- include: shell.yml
- include: haskell.yml
- include: haskell.yml

View file

@ -31,4 +31,4 @@
- rpmfusion-free
- rpmfusion-nonfree-updates-testing
- rpmfusion-nonfree-updates
- rpmfusion-nonfree
- rpmfusion-nonfree

View file

@ -29,4 +29,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever

View file

@ -29,4 +29,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever

View file

@ -31,4 +31,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever

View file

@ -29,4 +29,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever

View file

@ -29,4 +29,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever

View file

@ -32,4 +32,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever

View file

@ -28,4 +28,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever

View file

@ -28,4 +28,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever

View file

@ -30,4 +30,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever

View file

@ -28,4 +28,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever

View file

@ -28,4 +28,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever

View file

@ -31,4 +31,3 @@ type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever

View file

@ -7,7 +7,7 @@
- name: Update all packages
dnf:
name: '*'
name: "*"
state: latest
- name: Install system-upgrade plugin

View file

@ -2,4 +2,4 @@
- name: Create git config
template:
src: templates/gitconfig.j2
dest: ~/.gitconfig
dest: ~/.gitconfig

View file

@ -12,4 +12,4 @@
- name: Install HLint.hs
template:
src: templates/HLint.hs.j2
dest: ~/.ghc/HLint.hs
dest: ~/.ghc/HLint.hs

View file

@ -13,11 +13,11 @@
" Then run vim and install the plugins using command in normal mode:
" :PlugInstall
"
" Most of the settings come from vimconfig.com.
" Most of the settings come from vimconfig.com.
" We added few handy key mappings:
"
" Ctrl+Up/Down Move line or a block of selected lines
" Ctrl+j/k
" Ctrl+Up/Down Move line or a block of selected lines
" Ctrl+j/k
" <leader>pp Toggle paste mode on and off
" <leader><cr> Disable search highlight
"
@ -80,7 +80,7 @@ if &term =~ '256color'
" render properly when inside 256-color tmux and GNU screen.
" see also http://snk.tuxfamily.org/log/vim-256color-bce.html
set t_ut=
endif
endif
" If you happen to still have a problem on some terminal, uncomment:
" set t_Co=256
@ -99,12 +99,12 @@ set textwidth=80 " Line wrap (number of cols)
set showmatch " Highlight matching brace
set showcmd " Show last command on right
set cursorline " Highlight current line
set hlsearch " Highlight all search results
set smartcase " Enable smart-case search
set ignorecase " Always case-insensitive
set incsearch " Searches for strings incrementally
set autoindent " Auto-indent new lines
set cindent " Use 'C' style program indenting
set shiftwidth=4 " Number of auto-indent spaces
@ -113,7 +113,7 @@ set smarttab " Enable smart-tabs
set softtabstop=4 expandtab " Number of spaces per Tab
set wrap " Wrap lines
"""""
""""" Advanced
"""""

View file

@ -32,4 +32,4 @@ format = "[$path]($style)[$read_only]($read_only_style) "
[character]
success_symbol = "[%%](bold green)"
error_symbol = "[%%](bold red)"
error_symbol = "[%%](bold red)"

View file

@ -34,4 +34,4 @@ set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
run '~/.tmux/plugins/tpm/tpm'
run '~/.tmux/plugins/tpm/tpm'

View file

@ -7,4 +7,4 @@ set -g status-interval 1
set -g status-justify centre
set -g status-position top
setw -g window-status-current-format '#[fg=colour2][#I|#W#F]'
setw -g window-status-format '[#I|#W#F]'
setw -g window-status-format '[#I|#W#F]'

View file

@ -34,4 +34,4 @@ Host git.mfocko.xyz
Host git.gauss.mfocko.xyz
User git
Hostname git.gauss.mfocko.xyz
Port 2222
Port 2222

View file

@ -9,4 +9,4 @@ NoDisplay=true
StartupNotify=true
Categories=Utility;TextEditor;Development;IDE;
MimeType=x-scheme-handler/vscode-insiders;
Keywords=vscode;
Keywords=vscode;

View file

@ -31,4 +31,4 @@
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
}
]
]

View file

@ -43,4 +43,4 @@
"gitlens.views.repositories.location": "scm",
"gitlens.views.search.location": "scm",
"diffEditor.renderSideBySide": true
}
}

View file

@ -5,4 +5,4 @@ cat ~/.ssh/id_ed25519.pub
echo ">>> Exporting public GPG key <<<"
ID=$(gpg --list-secret-keys --keyid-format LONG | perl -n -e'/^sec.*\/(\w*)\s+/ && print $1')
gpg --armor --export $ID
gpg --armor --export $ID

View file

@ -7,4 +7,4 @@ ID=$(gpg --list-secret-keys --keyid-format LONG | perl -n -e'/^sec.*\/(\w*)\s+/
echo ">>> ID: $ID <<<"
echo ">>> Exporting public key <<<"
gpg --armor --export $ID
gpg --armor --export $ID