diff --git a/.github/workflows/norm.yml b/.github/workflows/pr_check.yml similarity index 50% rename from .github/workflows/norm.yml rename to .github/workflows/pr_check.yml index 70b135b..c8cf4ea 100644 --- a/.github/workflows/norm.yml +++ b/.github/workflows/pr_check.yml @@ -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 @@ -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" diff --git a/src/initialize.c b/src/initialize.c index 1c8fad8..218d638 100644 --- a/src/initialize.c +++ b/src/initialize.c @@ -6,7 +6,7 @@ /* By: ttsubo +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 */ /* */ /* ************************************************************************** */ @@ -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);