Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add more stict checking #152

Merged
merged 4 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = 4
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true

[*.md]
indent_style = space
indent_size = 2
trim_trailing_whitespace = false

[*.{nix,yml,yaml}]
indent_style = space
indent_size = 2
tab_width = 2

[*.{diff,patch}]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset

[*.lock]
indent_size = unset
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 15
reviewers:
- NotAShelf
assignees:
- NotAShelf
47 changes: 47 additions & 0 deletions .github/workflows/editorconfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Check validity of .editorconfig"

permissions: read-all

on:
pull_request:

jobs:
check-editorconfig:
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.title, '[skip ci]')"
steps:
- name: Get list of changed files from PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api \
repos/notashelf/neovim-flake/pulls/${{github.event.number}}/files --paginate \
| jq '.[] | select(.status != "removed") | .filename' \
> "$HOME/changed_files"

- name: Print list of changed files
run: |
cat "$HOME/changed_files"

- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Checking EditorConfig
shell: bash
run: |
cat "$HOME/changed_files" | nix-shell -p editorconfig-checker.out --run 'xargs -r editorconfig-checker -disable-indent-size --verbose'
echo -n "Check status: $?"

- name: Fail Gracefully
if: ${{ failure() }}
shell: bash
run: |
echo "::error:: Current formatting does not fit convention provided by .editorconfig located in the project root."
echo "Please make sure your editor properly integrates editorconfig. See https://editorconfig.org/#download for more."
exit 1
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ result/
# Ignore log files generated by my debuggers
*.log
*.log.*

#
8 changes: 4 additions & 4 deletions docs/release-notes/rl-0.2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ https://github.com/notashelf[notashelf]:

* There is now a scrollbar on active buffers, which can highlight errors by hooking to your LSPs. This is on by default, but can be toggled off under `vim.visuals` if seen necessary.

* Discord Rich Presence has been added through `presence.nvim` for those who want to flex that they are using the *superior* text editor.
* Discord Rich Presence has been added through `presence.nvim` for those who want to flex that they are using the *superior* text editor.

* An icon picker is now available with telescope integration. You can use `:IconPickerInsert` or `:IconPickerYank` to add icons to your code.

Expand All @@ -29,18 +29,18 @@ https://github.com/notashelf[notashelf]:

* Most UI components of Neovim have been replaced through the help of `noice.nvim`. There are also notifications and custom UI elements available for Neovim messages and prompts.

* A (floating by default) terminal has been added through `toggleterm.nvim`.
* A (floating by default) terminal has been added through `toggleterm.nvim`.

* Harness the power of ethical (`tabnine.nvim`) and not-so-ethical (`copilot.lua`) AI by those new assistant plugins. Both are off by default, TabNine needs to be wrapped before it's working.

* Experimental mouse gestures have been addede through `gesture.nvim`. See plugin page and the relevant module for more details on how to use.

* Re-open last visited buffers via `nvim-session-manager`. Disabled by default as deleting buffers seems to be problematic at the moment.

* Most of NvimTree's configuration options have been changed with some options being toggled to off by default.
* Most of NvimTree's configuration options have been changed with some options being toggled to off by default.

* Lualine had its configuration simplified and style toned down. Less color, more info.

* Modules where multiple plugin configurations were in the same directory have been simplified. Each plugin inside a single module gets its own directory to be imported.

* Separate config options with the same parent attribute have been merged into one for simplicity.
* Separate config options with the same parent attribute have been merged into one for simplicity.
12 changes: 6 additions & 6 deletions docs/release-notes/rl-0.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

Release 0.3 had to come out beore I wanted it to due to Neovim 0.9 dropping into nixpkgs-unstable. The treesitter changes
have prompted a treesitter rework, which was followed by reworking the languages system. Most of the changes to those are downstreamed
from the original repository. The feature requests that was originally planned for 0.3 have been moved to 0.4, which
from the original repository. The feature requests that was originally planned for 0.3 have been moved to 0.4, which
should come out soon.

[[sec-release-0.3-changelog]]
=== Changelog

* We have transitioned to flake-parts, from flake-utils to extend the flexibility of this flake. This means the flake structure
* We have transitioned to flake-parts, from flake-utils to extend the flexibility of this flake. This means the flake structure
is different than usual, but the functionality remains the same.

* We now provide a home-manager module. Do note that it is still far from perfect, but it works.
Expand All @@ -24,7 +24,7 @@ display the correct titles instad of `+prefix`
* Most of the modules have been refactored to separate `config` and `options` attributes.

* Darwin has been deprecated as the zig package is marked as broken. We will attempt to use the zig overlay to return Darwin
support.
support.

* `Fidget.nvim` has been added as a neat visual addition for LSP installations.

Expand All @@ -47,12 +47,12 @@ support.

* For <<opt-vim.visuals.indentBlankline.fillChar>> and <<opt-vim.visuals.indentBlankline.eolChar>> turning them off should use `null` rather than `""` now.

* Transparency has been made optional and has been disabled by default. <<opt-vim.theme.transparent>> option can be used to enable or
* Transparency has been made optional and has been disabled by default. <<opt-vim.theme.transparent>> option can be used to enable or
disable transparency for your configuration.

* Fixed deprecated configuration method for Tokyonight, and added new style "moon"

* Dart language support as well as extended flutter support has been added. Thanks to @FlafyDev for his contributions towards Dart
* Dart language support as well as extended flutter support has been added. Thanks to @FlafyDev for his contributions towards Dart
language support.

* Elixir language support has been added through `elixir-tools.nvim`.
Expand All @@ -61,7 +61,7 @@ language support.

* `modes.nvim` has been added to the UI plugins as a minor error highlighter.

* `smartcollumn.nvim` has been added to dynamically display a colorcolumn when the limit has been exceeded, providing
* `smartcollumn.nvim` has been added to dynamically display a colorcolumn when the limit has been exceeded, providing
per-buftype column position and more.

* `project.nvim` has been added for better project management inside Neovim.
Expand Down
2 changes: 1 addition & 1 deletion docs/release-notes/rl-0.5.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[[sec-release-0.5-changelog]]
=== Changelog

https://github.com/vagahbond[vagahbond]:
https://github.com/vagahbond[vagahbond]:
* Added phan language server for PHP.

* Added phpactor language server for PHP.
Expand Down
Loading