mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-05-16 16:02:45 -04:00
Enable Biome's `organizeImports` with groups matching the original ESLint `import/order` configuration: 1. **Node builtins** (`node:fs`, `path`, etc.) 2. *(blank line)* 3. **Third-party packages** (`express`, `@sentry/node`, etc.) 4. *(blank line)* 5. **Local/relative imports** (`../foo.js`, `./bar.js`, aliases) This resolves the inconsistency where Biome wasn't enforcing import grouping, meaning new files would lose the blank-line separation that the old ESLint config enforced. ### Impact - **354 files** updated out of 738 checked (~48%) - **+188 / -240 lines** (net -52) — almost entirely single blank line additions/removals between import groups - No import reordering; purely group separator consistency Fixes #7373 🤖 Generated by LLM (Claude, via OpenClaw)
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import path from 'node:path';
|
|
|
|
import Semver from 'semver';
|
|
|
|
import type {PreliminaryCompilerInfo} from '../../types/compiler.interfaces.js';
|
|
import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces.js';
|
|
import {BaseCompiler} from '../base-compiler.js';
|
|
import {CompilationEnvironment} from '../compilation-env.js';
|
|
import {asSafeVer} from '../utils.js';
|
|
|
|
export class C3Compiler extends BaseCompiler {
|
|
static get key() {
|
|
return 'c3c';
|
|
}
|
|
|
|
constructor(info: PreliminaryCompilerInfo, env: CompilationEnvironment) {
|
|
super(info, env);
|
|
this.compiler.supportsIrView = true;
|
|
this.compiler.irArg = ['--emit-llvm'];
|
|
}
|
|
|
|
override optionsForFilter(filters: ParseFiltersAndOutputOptions, outputFilename: string) {
|
|
const options = ['compile-only', '-g', '-l', 'pthread', '--no-obj', '--emit-asm'];
|
|
if (Semver.gte(asSafeVer(this.compiler.semver), '0.6.8', true)) {
|
|
options.push('--llvm-out', '.', '--asm-out', '.');
|
|
}
|
|
return options;
|
|
}
|
|
|
|
override getIrOutputFilename(inputFilename: string): string {
|
|
return this.filename(path.dirname(inputFilename) + '/output.ll');
|
|
}
|
|
}
|