-
Notifications
You must be signed in to change notification settings - Fork 47
Bugfixes, Etc. #502
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
Merged
+186
−104
Merged
Bugfixes, Etc. #502
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3bad682
Fix: Jumping to renamed files (#484)
jakubbortlik 870b55d
Fix: Store reviewer data before creating comment popup (#476)
jakubbortlik 1cbd7ec
Fix: Make publishing drafts more robust (#483)
jakubbortlik 4fc1bbd
Fix: Swap file_name and old_file_name in reviewer data (#485)
jakubbortlik aac1ebc
Feat: Enable toggling date format between relative and absolute (#491)
jakubbortlik cd06875
Fix: Add opts to help popup (#492)
jakubbortlik a4b9859
Fix: Force start_line for jumping to diagnostic to be inside buffer (…
jakubbortlik f5fbab4
fix: redefine colors after reloading colorscheme (#500)
jakubbortlik e9141cf
Fix: Use path instead of oldpath as fallback for unrenamed files (#496)
jakubbortlik 72af0d0
Fix: Use file_name when old_file_name is not set (#495)
jakubbortlik 25aada3
fix(ci): fix lua tests (#501)
harrisoncramer b12236f
Proxy Support (#499)
duckbrain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,44 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Setup and run tests for lua part of gitlab.nvim. | ||
# | ||
# In order to run tests you need to have `luarocks` and `git` installed. This script will check if | ||
# environment is already setup, if not it will initialize current directory with `luarocks`, | ||
# install `busted` framework and download plugin dependencies. | ||
# | ||
# Requires `luarocks`, `git`, and `nvim` installed. | ||
# | ||
set -e | ||
|
||
LUA_VERSION="5.1" | ||
set -euo pipefail | ||
|
||
PLUGINS_FOLDER="tests/plugins" | ||
PLUGINS=( | ||
"https://github.com/MunifTanjim/nui.nvim" | ||
"https://github.com/nvim-lua/plenary.nvim" | ||
"https://github.com/sindrets/diffview.nvim" | ||
"https://github.com/MunifTanjim/nui.nvim" | ||
"https://github.com/nvim-lua/plenary.nvim" | ||
"https://github.com/sindrets/diffview.nvim" | ||
) | ||
|
||
if ! command -v luarocks > /dev/null 2>&1; then | ||
echo "You need to have luarocks installed in order to run tests." | ||
exit 1 | ||
fi | ||
|
||
if ! command -v git > /dev/null 2>&1; then | ||
echo "You need to have git installed in order to run tests." | ||
exit 1 | ||
if ! command -v luarocks >/dev/null 2>&1; then | ||
echo "Error: luarocks not found. Please install LuaRocks." >&2 | ||
exit 1 | ||
fi | ||
|
||
if ! luarocks --lua-version=$LUA_VERSION which busted > /dev/null 2>&1; then | ||
echo "Installing busted." | ||
luarocks init | ||
luarocks config --scope project lua_version "$LUA_VERSION" | ||
luarocks install --lua-version="$LUA_VERSION" busted | ||
if ! command -v git >/dev/null 2>&1; then | ||
echo "Error: git not found. Please install Git." >&2 | ||
exit 1 | ||
fi | ||
|
||
for arg in "$@"; do | ||
if [[ $arg =~ "--coverage" ]] && ! luarocks --lua-version=$LUA_VERSION which luacov > /dev/null 2>&1; then | ||
luarocks install --lua-version="$LUA_VERSION" luacov | ||
# lcov reporter for luacov - lcov format is supported by `nvim-coverage` | ||
luarocks install --lua-version="$LUA_VERSION" luacov-reporter-lcov | ||
if ! command -v nvim >/dev/null 2>&1; then | ||
echo "Error: nvim not found. Please install Neovim." >&2 | ||
exit 1 | ||
fi | ||
done | ||
|
||
# Clone test plugin dependencies | ||
mkdir -p "$PLUGINS_FOLDER" | ||
for plugin in "${PLUGINS[@]}"; do | ||
plugin_name=${plugin##*/} | ||
plugin_folder="$PLUGINS_FOLDER/$plugin_name" | ||
|
||
# Check if plugin was already downloaded | ||
if [[ -d "$plugin_folder/.git" ]]; then | ||
# We could also try to pull here but I am not sure if that wouldn't slow down tests too much. | ||
continue | ||
fi | ||
|
||
plugin_name="${plugin##*/}" | ||
plugin_folder="$PLUGINS_FOLDER/$plugin_name" | ||
if [[ ! -d "$plugin_folder/.git" ]]; then | ||
echo "Cloning $plugin..." | ||
git clone --depth 1 "$plugin" "$plugin_folder" | ||
|
||
fi | ||
done | ||
|
||
nvim -u NONE -U NONE -N -i NONE -l tests/init.lua "$@" | ||
# Run tests | ||
echo "Running tests with Neovim..." | ||
nvim -u NONE -U NONE -N -i NONE -l tests/init.lua "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This inline boolean expression is hard to read and maintain. Consider using a simple
if
/else
block to clearly express which path should be used.Copilot uses AI. Check for mistakes.