lean-spec 0.2.4-dev.20251118091714 → 0.2.5-dev.20251118134144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4278,14 +4278,15 @@ Validating ${specs.length} specs...
4278
4278
 
4279
4279
  // src/commands/validate.ts
4280
4280
  function validateCommand() {
4281
- return new Command("validate").description("Validate specs for quality issues").argument("[specs...]", "Specific specs to validate (optional)").option("--max-lines <number>", "Custom line limit (default: 400)", parseInt).option("--verbose", "Show passing specs").option("--quiet", "Suppress warnings, only show errors").option("--format <format>", "Output format: default, json, compact", "default").option("--rule <rule>", "Filter by specific rule name (e.g., max-lines, frontmatter)").action(async (specs, options) => {
4281
+ return new Command("validate").description("Validate specs for quality issues").argument("[specs...]", "Specific specs to validate (optional)").option("--max-lines <number>", "Custom line limit (default: 400)", parseInt).option("--verbose", "Show passing specs").option("--quiet", "Suppress warnings, only show errors").option("--format <format>", "Output format: default, json, compact", "default").option("--rule <rule>", "Filter by specific rule name (e.g., max-lines, frontmatter)").option("--warnings-only", "Treat all issues as warnings, never fail (useful for CI pre-release checks)").action(async (specs, options) => {
4282
4282
  const passed = await validateSpecs({
4283
4283
  maxLines: options.maxLines,
4284
4284
  specs: specs && specs.length > 0 ? specs : void 0,
4285
4285
  verbose: options.verbose,
4286
4286
  quiet: options.quiet,
4287
4287
  format: options.format,
4288
- rule: options.rule
4288
+ rule: options.rule,
4289
+ warningsOnly: options.warningsOnly
4289
4290
  });
4290
4291
  process.exit(passed ? 0 : 1);
4291
4292
  });
@@ -4356,6 +4357,9 @@ async function validateSpecs(options = {}) {
4356
4357
  };
4357
4358
  const output = formatValidationResults(results, specs, config.specsDir, formatOptions);
4358
4359
  console.log(output);
4360
+ if (options.warningsOnly) {
4361
+ return true;
4362
+ }
4359
4363
  const hasErrors = results.some((r) => !r.result.passed);
4360
4364
  return !hasErrors;
4361
4365
  }
@@ -8455,5 +8459,5 @@ if (import.meta.url === `file://${process.argv[1]}`) {
8455
8459
  }
8456
8460
 
8457
8461
  export { analyzeCommand, archiveCommand, backfillCommand, boardCommand, checkCommand, compactCommand, createCommand, createMcpServer, depsCommand, filesCommand, ganttCommand, initCommand, linkCommand, listCommand, mcpCommand, migrateCommand, openCommand, searchCommand, splitCommand, statsCommand, templatesCommand, timelineCommand, tokensCommand, uiCommand, unlinkCommand, updateCommand, validateCommand, viewCommand };
8458
- //# sourceMappingURL=chunk-EICKCYUL.js.map
8459
- //# sourceMappingURL=chunk-EICKCYUL.js.map
8462
+ //# sourceMappingURL=chunk-7WXYOHZU.js.map
8463
+ //# sourceMappingURL=chunk-7WXYOHZU.js.map