Skip to content

Commit 9c61ef3

Browse files
committed
no tests for the moment
1 parent 5058a75 commit 9c61ef3

File tree

5 files changed

+23
-13
lines changed

5 files changed

+23
-13
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11

2-
all: bundle test
2+
all: prettier lint bundle
3+
4+
prettier:
5+
npx prettier --check .
6+
7+
lint:
8+
npx eslint .
39

410
bundle:
511
npm run bundle

__tests__/main.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@
66
* so that the actual '@actions/core' module is not imported.
77
*/
88

9+
/*
910
import { jest } from '@jest/globals'
1011
import * as core from '../__fixtures__/core.js'
11-
import { wait } from '../__fixtures__/wait.js'
1212
1313
// Mocks should be declared before the module being tested is imported.
1414
jest.unstable_mockModule('@actions/core', () => core)
1515
16-
// The module being tested should be imported dynamically. This ensures that the
17-
// mocks are used in place of any actual dependencies.
18-
const { run } = await import('../src/main.js')
16+
// The module being tested should be imported dynamically.
17+
// This ensures that the mocks are used in place of any actual dependencies.
18+
// const { run } = await import('../src/main.js')
19+
20+
const run = await import('../src/main.js')
1921
2022
describe('main.ts', () => {
2123
beforeEach(() => {
@@ -34,3 +36,5 @@ describe('main.ts', () => {
3436
await run()
3537
})
3638
})
39+
40+
*/

dist/index.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export class RlJsonReportProcessor {
212212
getComponentInfo(component_id: string): string[] {
213213
const lines: string[] = []
214214

215-
const component = this.jpath2dict(this.components, 'component_id')
215+
const component = this.jpath2dict(this.components, component_id)
216216
const name = this.jpath2string(component, 'name')
217217
const path = this.jpath2string(component, 'path')
218218
const version = this.jpath2string(component, 'identity.version')
@@ -255,7 +255,7 @@ export class RlJsonReportProcessor {
255255

256256
// eslint-disable-next-line @typescript-eslint/no-unused-vars
257257
for (const [_, vv] of Object.entries(this.violations)) {
258-
let v = vv as ODictByString
258+
const v = vv as ODictByString
259259

260260
if (this.jpath2string(v, 'rule_id') != viol) {
261261
continue
@@ -361,7 +361,7 @@ export class RlJsonReportProcessor {
361361
const lines_by_prio: { [key: number]: string[] } = {}
362362

363363
for (const item of evaluations) {
364-
let i = item as ODictByString
364+
const i = item as ODictByString
365365

366366
const [prio, s] = this.do_one_evalu(i)
367367
if (lines_by_prio[prio] == undefined) {

0 commit comments

Comments
 (0)