Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW: @W-15652656@: Add public interfaces before adding any business logic #10

Merged
merged 1 commit into from
May 7, 2024

Conversation

stephen-carter-at-sf
Copy link
Collaborator

As a first step, I'm simply adding in all the public interfaces so that we are ready at any time to publish a 0.1.0-alpha package of the core module so that client development may begin in parallel. I went ahead and added in interfaces for both the core package and the engine-api packages.

@stephen-carter-at-sf stephen-carter-at-sf changed the title @W-15652656@: Add public interfaces before adding any business logic NEW: @W-15652656@: Add public interfaces before adding any business logic May 7, 2024
Comment on lines +26 to +29
"branches": 80,
"functions": 80,
"lines": 80,
"statements": 80
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowering per the suggestion of Jag and Josh. But we are still at 100% coverage and I hope to keep it up there as much as possible.


// Temporarily making this an interface
export interface CodeAnalyzer {
addEnginePlugin(enginePlugin: EnginePlugin): void
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm purposely choosing not to add in any documentation comments since this is all subject to change. Only after things get stable does it make sense for us to add in all the comments for us to manage.

Comment on lines +9 to +22
export enum LogLevel {
Error = 1,
Warn = 2,
Info = 3,
Debug = 4,
Fine = 5
}

export type LogEvent = {
type: EventType.LogEvent,
timestamp: Date,
logLevel: LogLevel,
message: string
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might be able to reuse some of the Log4JS code that we use in the current scanner repo. Might not have to reinvent the wheel.

Comment on lines +6 to +8
getStartColumn(): number
getEndLine(): number
getEndColumn(): number
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these three be number|null?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do in my next PR. Sorry I missed your comments.

@@ -0,0 +1,27 @@
export enum SeverityLevel {
High = 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we decide against having a Critical = 0 for engine failures?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's a good idea. Will update in my next PR.

@stephen-carter-at-sf stephen-carter-at-sf merged commit af2dc05 into dev May 7, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants