jabrythehutt/awsrd

View on GitHub

Showing 7 of 11 total issues

Function constructor has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  constructor(scope: Construct, id: string, props: VscInstanceProps) {
    super(scope, id);
    this.instance = new Instance(this, "Instance", props);
    this.topic = new Topic(this, "InactivityTopic", {
      displayName: `Inactivity topic for ${this.instance.instanceId}`,
Severity: Major
Found in VscInstance.ts - About 2 hrs to fix

    Function run has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    async function run() {
      const args = await yargs(hideBin(process.argv))
        .option(SsmProxyScriptArg.InstanceId, { type: "string", demand: true })
        .option(SsmProxyScriptArg.Port, { type: "number", demand: true })
        .option(SsmProxyScriptArg.PublicKeyPath, { type: "string", demand: true })
    Severity: Major
    Found in ssmProxyScript.ts - About 2 hrs to fix

      Function execute has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        async execute(instanceId: string): Promise<void> {
          const instance = await this.instanceStore.describe(instanceId);
          const label = toInstanceLabel(instance as Instance);
          await commands.executeCommand(CommandName.start, instanceId);
          await window.withProgress(
      Severity: Minor
      Found in OpenCommandProvider.ts - About 2 hrs to fix

        Function resolve has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          async resolve(
            request: Record<StackArg | ContextArg, string | undefined>,
            construct: Construct
          ): Promise<VscInstanceProps> {
            const image = request.imageId
        Severity: Minor
        Found in InstancePropsResolver.ts - About 1 hr to fix

          Function execute has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            async execute(instanceId: string): Promise<void> {
              const instance = await this.instanceStore.describe(instanceId);
              const label = toInstanceLabel(instance as Instance);
              const title = `${
                this.targetState === "running" ? "Starting" : "Stopping"
          Severity: Minor
          Found in InstanceStateCommandProvider.ts - About 1 hr to fix

            Function start has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              async start(request: {
                instanceId: string;
                port: number;
                profile: string;
              }): Promise<ChildProcess> {
            Severity: Minor
            Found in SessionStarter.ts - About 1 hr to fix

              Function constructor has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                constructor(clientFactory: AwsClientFactory) {
                  this.ec2Client = clientFactory.createAwsClient(EC2Client);
                  this.instances = combineLatest([this.ec2Client, this.refreshSubject]).pipe(
                    switchMap(([client]) => this.listAll(client)),
                    shareReplay(1)
              Severity: Minor
              Found in InstanceStore.ts - About 1 hr to fix
                Severity
                Category
                Status
                Source
                Language