Summary
New projects created with repo_setup.sh should include optional IDE configuration files and Docker support to improve developer experience and enable containerized development/deployment.
Scope
Add optional IDE configurations and Docker support files to new projects based on project type and user preferences.
Required Files
IDE Support
1. .vscode/ (VS Code workspace)
Files to create:
.vscode/settings.json - Workspace settings (formatters, linters, extensions)
.vscode/extensions.json - Recommended extensions
.vscode/launch.json - Debug configurations
.vscode/tasks.json - Build tasks
Language-specific settings:
Java:
{
"java.configuration.updateBuildConfiguration": "automatic",
"java.compile.nullAnalysis.mode": "automatic",
"java.format.settings.url": ".editorconfig",
"maven.view": "hierarchical",
"java.debug.settings.hotCodeReplace": "auto"
}
C/C++:
{
"C_Cpp.default.compilerPath": "/usr/bin/gcc",
"C_Cpp.default.cppStandard": "c++20",
"C_Cpp.default.intelliSenseMode": "gcc-x64",
"cmake.configureOnOpen": true
}
Rust:
{
"rust-analyzer.checkOnSave.command": "clippy",
"rust-analyzer.cargo.features": "all",
"rust-analyzer.inlayHints.parameterHints.enable": true
}
Recommended extensions:
- Java: vscjava.vscode-java-pack, vscjava.vscode-maven
- C/C++: ms-vscode.cpptools, ms-vscode.cmake-tools, llvm-vs-code-extensions.vscode-clangd
- Rust: rust-lang.rust-analyzer, vadimcn.vscode-lldb
- All: editorconfig.editorconfig, ms-vscode.makefile-tools
2. .idea/ (IntelliJ IDEA / CLion / RustRover)
Files to create:
.idea/codeStyles/Project.xml - Code style settings
.idea/inspectionProfiles/Project_Default.xml - Code inspections
.idea/runConfigurations/ - Run/debug configurations
.idea/vcs.xml - VCS settings
Important: Most .idea/ files should be in .gitignore except:
- Code styles
- Inspection profiles
- Shared run configurations
- Copyright profiles
Language-specific:
- Java: Maven/Gradle integration, JDK settings
- C/C++: CMake/Bazel toolchain settings
- Rust: Cargo integration, clippy settings
Containerization Support
3. Dockerfile (language-specific)
Java (Maven) example:
# Build stage
FROM maven:3.9-eclipse-temurin-21 AS build
WORKDIR /app
COPY pom.xml .
COPY src ./src
RUN mvn clean package -DskipTests
# Runtime stage
FROM eclipse-temurin:21-jre-alpine
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]
C/C++ (CMake) example:
FROM gcc:13 AS build
WORKDIR /app
COPY . .
RUN cmake -B build -DCMAKE_BUILD_TYPE=Release && \
cmake --build build --parallel
FROM debian:bookworm-slim
WORKDIR /app
COPY --from=build /app/build/bin/* .
CMD ["./app"]
Rust example:
FROM rust:1.75 AS build
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
COPY src ./src
RUN cargo build --release
FROM debian:bookworm-slim
WORKDIR /app
COPY --from=build /app/target/release/app .
CMD ["./app"]
4. .dockerignore
Generic template:
# Version control
.git
.gitignore
.github
# Build artifacts
target/
build/
dist/
*.o
*.a
*.so
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Documentation
*.md
docs/
LICENSE
# Tests
tests/
test/
*.test
5. docker-compose.yml (optional)
For projects with multiple services or dependencies:
version: '3.9'
services:
app:
build: .
ports:
- "8080:8080"
environment:
- LOG_LEVEL=info
volumes:
- ./data:/app/data
depends_on:
- db
db:
image: postgres:16-alpine
environment:
POSTGRES_PASSWORD: example
volumes:
- db-data:/var/lib/postgresql/data
volumes:
db-data:
Implementation Approach
Phase 1: Create Template Files
# Directory structure
templates/
├── .github/ # (from issue #19)
├── .vscode/
│ ├── settings.json.java
│ ├── settings.json.cpp
│ ├── settings.json.c
│ ├── settings.json.rust
│ ├── extensions.json.java
│ ├── extensions.json.cpp
│ ├── extensions.json.rust
│ └── launch.json.{lang}
├── .idea/
│ └── codeStyles/
│ └── Project.xml
├── docker/
│ ├── Dockerfile.java
│ ├── Dockerfile.cpp
│ ├── Dockerfile.c
│ ├── Dockerfile.rust
│ ├── .dockerignore.template
│ └── docker-compose.yml.template
Phase 2: Update repo_setup.sh
Add flags and setup function:
# New flags
WITH_VSCODE="false"
WITH_IDEA="false"
WITH_DOCKER="false"
# Parse new options
--with-vscode) WITH_VSCODE="true" ;;
--with-idea) WITH_IDEA="true" ;;
--with-docker) WITH_DOCKER="true" ;;
# New function
setup_dev_environment() {
local project_type="$1"
# VS Code
if [[ "$WITH_VSCODE" == "true" ]]; then
info "Setting up VS Code workspace"
mkdir -p .vscode
# Copy language-specific settings
if [[ -f ".common/artagon-common/templates/.vscode/settings.json.$project_type" ]]; then
cp ".common/artagon-common/templates/.vscode/settings.json.$project_type" \
.vscode/settings.json
fi
if [[ -f ".common/artagon-common/templates/.vscode/extensions.json.$project_type" ]]; then
cp ".common/artagon-common/templates/.vscode/extensions.json.$project_type" \
.vscode/extensions.json
fi
success "VS Code workspace configured"
fi
# IntelliJ IDEA
if [[ "$WITH_IDEA" == "true" ]]; then
info "Setting up IntelliJ IDEA project"
mkdir -p .idea/codeStyles
cp .common/artagon-common/templates/.idea/codeStyles/Project.xml \
.idea/codeStyles/Project.xml
success "IntelliJ IDEA project configured"
fi
# Docker
if [[ "$WITH_DOCKER" == "true" ]]; then
info "Setting up Docker support"
# Copy Dockerfile
if [[ -f ".common/artagon-common/templates/docker/Dockerfile.$project_type" ]]; then
cp ".common/artagon-common/templates/docker/Dockerfile.$project_type" Dockerfile
fi
# Copy .dockerignore
cp .common/artagon-common/templates/docker/.dockerignore.template .dockerignore
# Optional: docker-compose.yml
if [[ -f ".common/artagon-common/templates/docker/docker-compose.yml.template" ]]; then
cp ".common/artagon-common/templates/docker/docker-compose.yml.template" \
docker-compose.yml
fi
success "Docker support configured"
fi
}
Phase 3: Update .gitignore
Ensure IDE-specific files are properly ignored (keep only shared configs):
# VS Code (keep only workspace settings we want shared)
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/tasks.json
# IntelliJ IDEA (keep only shared configs)
.idea/*
!.idea/codeStyles/
!.idea/inspectionProfiles/
!.idea/runConfigurations/
!.idea/vcs.xml
Testing Requirements
Integration tests must verify:
- ✅ VS Code settings created for correct language
- ✅ IntelliJ IDEA configs created when requested
- ✅ Dockerfile matches project type
- ✅ .dockerignore excludes appropriate files
- ✅ Files are valid JSON/YAML
- ✅ Docker builds successfully (if possible)
Add test suite: tests/integration/test_dev_environment.sh
Documentation Updates
README.md - Document new flags: --with-vscode, --with-idea, --with-docker
docs/CONTRIBUTING.md - Explain IDE setup for contributors
scripts/repo_setup.sh help text - Document new options
- Create
docs/IDE-SETUP.md - Detailed IDE configuration guide
- Create
docs/DOCKER.md - Docker usage guide
Benefits
- Developer Experience: Ready-to-use IDE configurations
- Consistency: Same settings across team members
- Onboarding: New developers can start immediately
- Containerization: Easy deployment and testing
- CI/CD: Docker images for build/test/deploy pipelines
Usage Examples
# Java project with VS Code and Docker
./scripts/repo_setup.sh --type java --name my-api \
--with-vscode --with-docker
# C++ project with CLion (IntelliJ) support
./scripts/repo_setup.sh --type cpp --name my-engine \
--with-idea --with-docker
# Rust project with all IDE support
./scripts/repo_setup.sh --type rust --name my-tool \
--with-vscode --with-idea --with-docker
Acceptance Criteria
Related Issues
Notes
- IDE configs are optional (not enabled by default) to avoid forcing specific IDEs
- Docker support should include multi-stage builds for smaller images
- Consider adding
.devcontainer/devcontainer.json for VS Code Remote Containers
- IntelliJ IDEA configs should be minimal (most settings are user-specific)
- VS Code settings should reference
.editorconfig where possible
Summary
New projects created with
repo_setup.shshould include optional IDE configuration files and Docker support to improve developer experience and enable containerized development/deployment.Scope
Add optional IDE configurations and Docker support files to new projects based on project type and user preferences.
Required Files
IDE Support
1.
.vscode/(VS Code workspace)Files to create:
.vscode/settings.json- Workspace settings (formatters, linters, extensions).vscode/extensions.json- Recommended extensions.vscode/launch.json- Debug configurations.vscode/tasks.json- Build tasksLanguage-specific settings:
Java:
{ "java.configuration.updateBuildConfiguration": "automatic", "java.compile.nullAnalysis.mode": "automatic", "java.format.settings.url": ".editorconfig", "maven.view": "hierarchical", "java.debug.settings.hotCodeReplace": "auto" }C/C++:
{ "C_Cpp.default.compilerPath": "/usr/bin/gcc", "C_Cpp.default.cppStandard": "c++20", "C_Cpp.default.intelliSenseMode": "gcc-x64", "cmake.configureOnOpen": true }Rust:
{ "rust-analyzer.checkOnSave.command": "clippy", "rust-analyzer.cargo.features": "all", "rust-analyzer.inlayHints.parameterHints.enable": true }Recommended extensions:
2.
.idea/(IntelliJ IDEA / CLion / RustRover)Files to create:
.idea/codeStyles/Project.xml- Code style settings.idea/inspectionProfiles/Project_Default.xml- Code inspections.idea/runConfigurations/- Run/debug configurations.idea/vcs.xml- VCS settingsImportant: Most
.idea/files should be in.gitignoreexcept:Language-specific:
Containerization Support
3.
Dockerfile(language-specific)Java (Maven) example:
C/C++ (CMake) example:
Rust example:
4.
.dockerignoreGeneric template:
5.
docker-compose.yml(optional)For projects with multiple services or dependencies:
Implementation Approach
Phase 1: Create Template Files
Phase 2: Update repo_setup.sh
Add flags and setup function:
Phase 3: Update .gitignore
Ensure IDE-specific files are properly ignored (keep only shared configs):
Testing Requirements
Integration tests must verify:
Add test suite:
tests/integration/test_dev_environment.shDocumentation Updates
README.md- Document new flags:--with-vscode,--with-idea,--with-dockerdocs/CONTRIBUTING.md- Explain IDE setup for contributorsscripts/repo_setup.shhelp text - Document new optionsdocs/IDE-SETUP.md- Detailed IDE configuration guidedocs/DOCKER.md- Docker usage guideBenefits
Usage Examples
Acceptance Criteria
--with-vscode,--with-idea,--with-dockerRelated Issues
Notes
.devcontainer/devcontainer.jsonfor VS Code Remote Containers.editorconfigwhere possible