Skip to content

Commit 84b5abe

Browse files
authored
Merge branch 'main' into feature-timeout-syntax-check
2 parents ff2d5c0 + d66e40f commit 84b5abe

5 files changed

Lines changed: 21 additions & 18 deletions

File tree

INSTALLATION.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pip install mbake
1414

1515
### 2. Configuration
1616

17-
Your configuration file is located at `~/.bake.toml`. It contains sensible defaults for Makefile formatting:
17+
Your configuration file is located at `{XDG_CONFIG_HOME}/bake.toml`. It contains sensible defaults for Makefile formatting:
1818

1919
```toml
2020
# Global settings
@@ -158,7 +158,7 @@ Once installed, the extension provides:
158158
Access these settings through VS Code preferences (`Cmd/Ctrl + ,`) and search for "bake":
159159

160160
- **`bake.executablePath`**: Path to bake executable (default: `"bake"`)
161-
- **`bake.configPath`**: Path to config file (default: uses `~/.bake.toml`)
161+
- **`bake.configPath`**: Path to config file (default: uses `{XDG_CONFIG_HOME}/bake.toml`)
162162
- **`bake.formatOnSave`**: Auto-format on save (default: `false`)
163163
- **`bake.showDiff`**: Show diff when formatting (default: `false`)
164164
- **`bake.verbose`**: Enable verbose output (default: `false`)
@@ -232,12 +232,12 @@ bake_fmt/
232232
│ └── plugins/ # Formatting rule plugins
233233
├── tests/ # Test suite
234234
├── vscode-bake-extension/ # VS Code extension
235-
│ ├── package.json # Extension manifest
236-
│ ├── extension.js # Extension logic
237-
│ └── README.md # Extension documentation
238-
├── pyproject.toml # Python package configuration
239-
├── .bake.toml.example # Example configuration
240-
└── ~/.bake.toml # Your configuration file
235+
│ ├── package.json # Extension manifest
236+
│ ├── extension.js # Extension logic
237+
│ └── README.md # Extension documentation
238+
├── pyproject.toml # Python package configuration
239+
├── .bake.toml.example # Example configuration
240+
└── {XDG_CONFIG_HOME}/bake.toml # Your configuration file
241241
```
242242

243243
## 🚀 Quick Start Examples
@@ -289,8 +289,9 @@ Now every time you save a Makefile, it's automatically formatted!
289289

290290
**Configuration errors:**
291291

292-
- Ensure `~/.bake.toml` exists and is valid TOML
293-
- Use the provided example: `cp .bake.toml.example ~/.bake.toml`
292+
- Ensure `{XDG_CONFIG_HOME}/bake.toml` exists and is valid TOML
293+
- Use the provided example: `cp .bake.toml.example ${XDG_CONFIG_HOME}/bake.toml`
294+
or `cp .bake.toml.example ~/.config/bake.toml`
294295

295296
### VS Code Extension Issues
296297

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
- **Smart formatting**: Tabs for recipes, consistent spacing, line continuation cleanup
3030
- **Intelligent .PHONY detection**: Automatically identifies and manages phony targets
3131
- **Syntax validation**: Ensures Makefiles are valid before and after formatting
32-
- **Configurable rules**: Customize behavior via `~/.bake.toml`
32+
- **Configurable rules**: Customize behavior via `{XDG_CONFIG_HOME}/bake.toml`
3333
- **CI/CD ready**: Check mode for automated formatting validation
3434
- **VSCode extension**: Full editor integration available
3535

mbake/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,9 @@ def format(
409409
10, "--timeout", help="Set timeout for Makefile syntax check"
410410
),
411411
config_file: Optional[Path] = typer.Option(
412-
None, "--config", help="Path to configuration file (default: ~/.bake.toml)."
412+
None,
413+
"--config",
414+
help="Path to configuration file (default: {XDG_CONFIG_HOME}/bake.toml).",
413415
),
414416
backup: bool = typer.Option(
415417
False, "--backup", "-b", help="Create backup files before formatting."

vscode-mbake-extension/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Access these settings through VS Code's settings (`Cmd/Ctrl + ,`) and search for
5959

6060
- **Type**: `string`
6161
- **Default**: `""`
62-
- **Description**: Path to the bake configuration file. Leave empty to use default (~/.bake.toml).
62+
- **Description**: Path to the bake configuration file. Leave empty to use default ({XDG_CONFIG_HOME}/bake.toml).
6363

6464
### `mbake.formatOnSave`
6565

@@ -88,7 +88,7 @@ Add these settings to your VS Code `settings.json`:
8888
```json
8989
{
9090
"mbake.executablePath": "/usr/local/bin/bake",
91-
"mbake.configPath": "/path/to/your/.bake.toml",
91+
"mbake.configPath": "/path/to/your/bake.toml",
9292
"mbake.formatOnSave": true,
9393
"mbake.verbose": true,
9494
"mbake.showDiff": false
@@ -183,7 +183,7 @@ bake --help
183183

184184
If you see errors about missing configuration files, either:
185185

186-
1. Create a `~/.bake.toml` configuration file
186+
1. Create a `{XDG_CONFIG_HOME}/bake.toml` configuration file
187187
2. Set a custom path in `mbake.configPath`
188188
3. Use the example configuration provided in the mbake repository
189189

@@ -197,7 +197,7 @@ Make sure your file is recognized as a Makefile:
197197

198198
## Example Configuration File
199199

200-
Create `~/.bake.toml` with these contents:
200+
Create `{XDG_CONFIG_HOME}/bake.toml` with these contents:
201201

202202
```toml
203203
# Global settings

vscode-mbake-extension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"mbake.configPath": {
107107
"type": "string",
108108
"default": "",
109-
"description": "Path to the bake configuration file. Leave empty to use default (~/.bake.toml)."
109+
"description": "Path to the bake configuration file. Leave empty to use default ({XDG_CONFIG_HOME}/bake.toml)."
110110
},
111111
"mbake.formatOnSave": {
112112
"type": "boolean",
@@ -157,4 +157,4 @@
157157
"color": "#1e1e1e",
158158
"theme": "dark"
159159
}
160-
}
160+
}

0 commit comments

Comments
 (0)