Skip to content

Commit

Permalink
Merge pull request #147 from sir-gon/develop
Browse files Browse the repository at this point in the history
[BUGFIX] [snyk]: Using the loop variable k
  • Loading branch information
sir-gon authored Jul 31, 2023
2 parents 33941b2 + c13f0af commit fb58dfa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM node:20.2.0-alpine3.16 as base
FROM node:20.2.0-alpine3.16 AS base

RUN apk add --update --no-cache make

ENV WORKDIR=/app
WORKDIR ${WORKDIR}

FROM node:20.2.0-alpine3.16 as lint
FROM node:20.2.0-alpine3.16 AS lint

ENV WORKDIR=/app
WORKDIR ${WORKDIR}
Expand All @@ -14,9 +14,9 @@ COPY ./src ${WORKDIR}/src
RUN apk add --update --no-cache make
RUN npm install -g markdownlint-cli

FROM base as development
FROM base AS development

FROM development as builder
FROM development AS builder

COPY ./Makefile ${WORKDIR}/
COPY ./package.json ${WORKDIR}/package.json
Expand All @@ -31,7 +31,7 @@ RUN npm ci --verbose
##
## https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions
##
FROM builder as testing
FROM builder AS testing

ENV LOG_LEVEL=info
ENV BRUTEFORCE=false
Expand All @@ -50,7 +50,7 @@ CMD ["npm", "run", "test"]
## in the production phase, "good practices" such as
## WORKSPACE and USER are maintained
##
FROM builder as production
FROM builder AS production

ENV LOG_LEVEL=info
ENV BRUTEFORCE=false
Expand Down
3 changes: 1 addition & 2 deletions src/hackerrank/implementation/sockMerchant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export function sockMerchant(n: number, ar: number[]): number {

console.debug(matches);

let k: keyof Matches;
for (k in matches) {
for (const k in matches) {
console.debug(matches[k]);

result += Math.floor(matches[k] / 2);
Expand Down

0 comments on commit fb58dfa

Please sign in to comment.