• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

streetsidesoftware / cspell / 15425583305

03 Jun 2025 06:59PM UTC coverage: 92.385% (-0.8%) from 93.187%
15425583305

Pull #7414

github

web-flow
Merge 15d41a737 into 6e3c5d0e0
Pull Request #7414: fix: Add init command to command-line.

12827 of 15127 branches covered (84.8%)

182 of 345 new or added lines in 13 files covered. (52.75%)

4 existing lines in 2 files now uncovered.

15796 of 17098 relevant lines covered (92.39%)

30173.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/packages/cspell/src/app/commandInit.ts
1
import type { Command } from 'commander';
2

3
import { createInit } from './application.mjs';
4
import { collect, crOpt } from './commandHelpers.js';
5
import type { InitOptions } from './config/index.js';
6

7
export function commandInit(prog: Command): Command {
8
    const command = prog
86✔
9
        .command('init')
10
        .description('Initialize a CSpell configuration file.')
11
        .option('-o, --output <path>', 'Define where to write file.')
12
        .addOption(
13
            crOpt('--format <format>', 'Define the format of the file.')
14
                .choices(['yaml', 'json', 'jsonc'])
15
                .default('yaml'),
16
        )
17
        .option('--import <path|package>', 'Import a configuration file or dictionary package.', collect)
18
        .option('--locale <locale>', 'Define the locale to use when spell checking (e.g., en, en-US, de).')
19
        .addOption(crOpt('--dictionary <dictionary>', 'Enable a dictionary.', collect).default(undefined))
20
        .addOption(crOpt('--comments', 'Add comments to the config file.').default(undefined).hideHelp())
21
        .option('--no-comments', 'Do not add comments to the config file.')
22
        .option('--no-schema', 'Do not add the schema reference to the config file.')
23
        .action((options: InitOptions) => {
NEW
24
            return createInit(options);
×
25
        });
26

27
    return command;
86✔
28
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc