moved scripts to script folder
This commit is contained in:
parent
4614a2d382
commit
b43901de1a
9
Makefile
9
Makefile
@ -89,7 +89,7 @@ test_build: release
|
|||||||
# Coverage targets
|
# Coverage targets
|
||||||
coverage:
|
coverage:
|
||||||
@echo "Running coverage analysis..."
|
@echo "Running coverage analysis..."
|
||||||
./coverage.sh
|
./scripts/coverage.sh
|
||||||
|
|
||||||
coverage_clean:
|
coverage_clean:
|
||||||
@echo "Cleaning coverage data..."
|
@echo "Cleaning coverage data..."
|
||||||
@ -103,5 +103,10 @@ coverage_manual:
|
|||||||
$(CMAKE_BUILD) build_coverage
|
$(CMAKE_BUILD) build_coverage
|
||||||
cd build_coverage && $(CMAKE_BUILD) . --target coverage
|
cd build_coverage && $(CMAKE_BUILD) . --target coverage
|
||||||
|
|
||||||
|
# Code formatting target
|
||||||
|
format:
|
||||||
|
@echo "Running code formatting..."
|
||||||
|
./scripts/format.sh
|
||||||
|
|
||||||
# Mark targets as phony
|
# Mark targets as phony
|
||||||
.PHONY: all release debug asan run run_release run_debug run_asan clean fclean re test test_verbose test_build coverage coverage_clean coverage_manual
|
.PHONY: all release debug asan run run_release run_debug run_asan clean fclean re test test_verbose test_build coverage coverage_clean coverage_manual format
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
# Don't exit on first error - we want to continue checking all files
|
# Don't exit on first error - we want to continue checking all files
|
||||||
# set -e
|
# set -e
|
||||||
|
|
||||||
# Use current working directory as project root
|
# Change to project root directory (parent of scripts directory)
|
||||||
|
cd "$(dirname "$0")/.." || exit 1
|
||||||
PROJECT_ROOT="$(pwd)"
|
PROJECT_ROOT="$(pwd)"
|
||||||
|
|
||||||
# Find the build directory - check multiple possible locations
|
# Find the build directory - check multiple possible locations
|
||||||
@ -87,7 +88,7 @@ if [ ! -f "$BUILD_DIR/compile_commands.json" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Create results directory
|
# Create results directory
|
||||||
RESULTS_DIR="$PROJECT_ROOT/iwyu_results"
|
RESULTS_DIR="$PROJECT_ROOT/scripts/iwyu_results"
|
||||||
mkdir -p "$RESULTS_DIR"
|
mkdir -p "$RESULTS_DIR"
|
||||||
|
|
||||||
# Function to run IWYU on a single file
|
# Function to run IWYU on a single file
|
||||||
@ -6,7 +6,7 @@
|
|||||||
set -e # Exit on any error
|
set -e # Exit on any error
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
PROJECT_ROOT="$SCRIPT_DIR"
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||||
BUILD_DIR="$PROJECT_ROOT/build_coverage"
|
BUILD_DIR="$PROJECT_ROOT/build_coverage"
|
||||||
|
|
||||||
# Colors for output
|
# Colors for output
|
||||||
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Find project root (directory containing this script)
|
# Find project root (parent directory of scripts)
|
||||||
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
RESULTS_DIR="$PROJECT_ROOT/iwyu_results"
|
RESULTS_DIR="$PROJECT_ROOT/scripts/iwyu_results"
|
||||||
|
|
||||||
# Colors for output
|
# Colors for output
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
@ -1,10 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
./check_iwyu.sh
|
# Change to project root directory
|
||||||
./fix_iwyu_auto.sh
|
cd "$(dirname "$0")/.." || exit 1
|
||||||
|
|
||||||
|
./scripts/check_iwyu.sh
|
||||||
|
./scripts/fix_iwyu_auto.sh
|
||||||
|
|
||||||
find webserv -name "*.hpp" -o -name "*.cpp" | xargs sed -i -E 's/#include "(.*)"/#include <\1>/g'
|
find webserv -name "*.hpp" -o -name "*.cpp" | xargs sed -i -E 's/#include "(.*)"/#include <\1>/g'
|
||||||
find webserv -name "*.cpp" -o -name "*.hpp" | xargs clang-format -i
|
find webserv -name "*.cpp" -o -name "*.hpp" | xargs clang-format -i
|
||||||
find webserv -name "*.hpp" -exec sh -c 'if ! grep -q "#pragma once" "$1"; then echo "Missing #pragma once in $1"; fi' _ {} \;
|
find webserv -name "*.hpp" -exec sh -c 'if ! grep -q "#pragma once" "$1"; then echo "Missing #pragma once in $1"; fi' _ {} \;
|
||||||
# Reorder includes to put corresponding header first
|
# Reorder includes to put corresponding header first
|
||||||
./reorder_includes.sh
|
./scripts/reorder_includes.sh
|
||||||
@ -4,6 +4,9 @@
|
|||||||
# 1. Move the corresponding .hpp include to the top of includes
|
# 1. Move the corresponding .hpp include to the top of includes
|
||||||
# 2. Add a blank line after it (avoiding multiple blank lines)
|
# 2. Add a blank line after it (avoiding multiple blank lines)
|
||||||
|
|
||||||
|
# Change to project root directory
|
||||||
|
cd "$(dirname "$0")/.." || exit 1
|
||||||
|
|
||||||
find webserv -name "*.cpp" | while read -r cpp_file; do
|
find webserv -name "*.cpp" | while read -r cpp_file; do
|
||||||
# Get the base name without extension (e.g., "Client" from "Client.cpp")
|
# Get the base name without extension (e.g., "Client" from "Client.cpp")
|
||||||
base_name=$(basename "$cpp_file" .cpp)
|
base_name=$(basename "$cpp_file" .cpp)
|
||||||
@ -56,6 +56,9 @@ done
|
|||||||
echo -e "${BLUE}🧪 Webserv Test Runner${NC}"
|
echo -e "${BLUE}🧪 Webserv Test Runner${NC}"
|
||||||
echo "========================================"
|
echo "========================================"
|
||||||
|
|
||||||
|
# Change to project root directory
|
||||||
|
cd "$(dirname "$0")/.." || exit 1
|
||||||
|
|
||||||
# Check if we're in the right directory
|
# Check if we're in the right directory
|
||||||
if [[ ! -f "CMakeLists.txt" || ! -d "tests" ]]; then
|
if [[ ! -f "CMakeLists.txt" || ! -d "tests" ]]; then
|
||||||
echo -e "${RED}❌ Error: Please run this script from the webserv project root${NC}"
|
echo -e "${RED}❌ Error: Please run this script from the webserv project root${NC}"
|
||||||
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
set -e # Exit on any error
|
set -e # Exit on any error
|
||||||
|
|
||||||
|
# Change to project root directory
|
||||||
|
cd "$(dirname "$0")/.." || exit 1
|
||||||
|
|
||||||
echo "🚀 Setting up webserv development environment..."
|
echo "🚀 Setting up webserv development environment..."
|
||||||
|
|
||||||
# Detect environment
|
# Detect environment
|
||||||
@ -10,13 +10,11 @@
|
|||||||
#include <webserv/http/HttpHeaders.hpp> // for HttpHeaders
|
#include <webserv/http/HttpHeaders.hpp> // for HttpHeaders
|
||||||
#include <webserv/log/Log.hpp> // for LOCATION, Log
|
#include <webserv/log/Log.hpp> // for LOCATION, Log
|
||||||
|
|
||||||
#include <functional> // for identity
|
#include <memory> // for unique_ptr
|
||||||
#include <memory> // for unique_ptr
|
#include <optional> // for optional
|
||||||
#include <optional> // for optional
|
#include <ranges> // for __find_fn, find
|
||||||
#include <ranges> // for __find_fn, find
|
#include <string> // for basic_string, string
|
||||||
#include <string> // for basic_string, string, operator==
|
#include <vector> // for vector
|
||||||
#include <utility> // for move
|
|
||||||
#include <vector> // for vector
|
|
||||||
|
|
||||||
bool Router::isMethodSupported(const std::string &method, const AConfig &config)
|
bool Router::isMethodSupported(const std::string &method, const AConfig &config)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user