Skip to content
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
20 changes: 18 additions & 2 deletions .github/workflows/norm.yml → .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
name: Norminette Check
name: PR Check

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run build check
shell: bash
run: |
sudo apt update
sudo apt install libreadline-dev -y
chmod +x copy_to_subject.sh
echo "check" | ./copy_to_subject.sh
make --no-print-directory -f check/Makefile
continue-on-error: false
norm:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Install norminette
Expand All @@ -16,7 +30,9 @@ jobs:
- name: Run norminette
shell: bash
run: |
norminette > norm_result.txt
chmod +x copy_to_subject.sh
echo "check" | ./copy_to_subject.sh
norminette check/ > norm_result.txt
cat norm_result.txt
if grep -q "Error:" norm_result.txt; then
echo "❌ Norminette check failed"
Expand Down
4 changes: 1 addition & 3 deletions src/initialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: ttsubo <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/15 15:42:46 by dayano #+# #+# */
/* Updated: 2025/04/29 16:18:49 by ttsubo ### ########.fr */
/* Updated: 2025/05/01 13:46:27 by ttsubo ### ########.fr */
/* */
/* ************************************************************************** */

Expand All @@ -19,8 +19,6 @@ static int _split_key_value(char *env_val, char **key_out, char **val_out)

env_len = ft_strlen(env_val);
eq_pos = ft_strlen_until(env_val, '=');
node->key = NULL;
node->value = NULL;
if (eq_pos == ft_strlen(env_val))
return (1);
*key_out = ft_substr(env_val, 0, eq_pos);
Expand Down