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

Adds check empty file upload and tests added tests for file upload. #160

Closed
wants to merge 5 commits into from

Conversation

gnaaruag
Copy link
Contributor

@gnaaruag gnaaruag commented Jul 8, 2024

Checklist

Make sure you have

  • Added relevant @nestjs/swagger decorators wherever required
  • Added test cases (unit and integration) wherever required

Description

  • this adds a empty file upload check to the file-upload.controller.ts in packages/common/src
  • also adds tests for correct file upload, empty file upload
  • if the file is found to be empty a status code of 400 is sent, else it is uploaded further according to process.env.STORAGE_MODE
  • this pr also adds attributes size and buffer to the MultipartInterface. (this allows us to have access to size of file and its Buffer contents; needed for empty file check)
  • in file-upload.interceptor the line request.raw = request.raw || request; allows for valid request body to pass through

Steps to test

to test manually
create a post request to /file/upload-file
test with empty file and non empty file via multipart/form-data

to run automated test
navigate to samples/06-file-upload and run npm run test:e2e

fixes #156
fixes #149

Summary by CodeRabbit

  • New Features

    • Added validation for non-empty files during upload to prevent zero-size file uploads.
    • Enhanced file upload functionality with support for file size and buffer handling.
  • Bug Fixes

    • Addressed an issue in file upload where the request.raw could be falsy.
  • Documentation

    • Restructured and expanded CONTRIBUTING.md with detailed guidelines and a pre-commit checklist.
  • Tests

    • Added tests for file upload functionality, including scenarios for files with content and empty files, with appropriate cleanup post-tests.

Copy link

coderabbitai bot commented Jul 8, 2024

Warning

Rate limit exceeded

@gnaaruag has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 53 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 18c0648 and 66c734b.

Walkthrough

The changes primarily focus on enhancing file upload functionality by checking for empty file uploads, updating interceptor handling, expanding the file interface, and adding comprehensive tests. Additionally, the contribution guidelines have been significantly restructured for clarity. This ensures better resource management, security, data integrity, and developer guidance.

Changes

Files/Paths Change Summary
...file-upload.controller.ts Added a check for file size being zero before allowing file upload.
...file-upload.interceptor.ts Enhanced the interceptor to handle request object modifications.
...file-upload.interface.ts Added size and buffer properties to the MultipartFile interface.
.../app.e2e-spec.ts Imported fs and path modules, added tests for file upload, including handling empty files, and performed cleanup.
CONTRIBUTING.md Restructured and expanded with detailed guidelines on contributing, including new subsections and instructions.

Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant Client as Client
    participant Controller as FileUploadController
    participant Interceptor as FastifyFileInterceptor
    participant Service as FileService
    
    Client->>+Interceptor: Upload File Request
    Interceptor->>+Interceptor: Check for request.raw
    Interceptor-->>Client: Error if request.raw is falsy
    Interceptor-->>Controller: Continue
    Controller->>+Service: Check file size
    Service-->>Controller: Return error if file is empty
    Controller-->>Client: Error if file is empty
    Controller->>Client: Success if file is valid

Assessment against linked issues

Objective Addressed Explanation
Add check for empty file upload (156)
Write tests for file upload feature (149)

Poem

In bytes and code, the changes flow,
No empty files can now slip by,
Tests ensure uploads fly,
Contributions clearer, shine in glow.
🎶✨ A rabbit's charm in every row. 🐇🛠️


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range and nitpick comments (1)
packages/common/src/controllers/file-upload.controller.ts (1)

32-32: Improve comment clarity.

The comment on line 32 can be made clearer.

- // file.size comes from MultiPartFile Interface defined in file-upload.interface
+ // file.size is a property of the MultipartFile interface defined in file-upload.interface.ts
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f75e48f and 5cd6314.

Files selected for processing (5)
  • packages/common/src/controllers/file-upload.controller.ts (2 hunks)
  • packages/common/src/interceptors/file-upload.interceptor.ts (1 hunks)
  • packages/common/src/interfaces/file-upload.interface.ts (1 hunks)
  • packages/common/test/app.e2e-spec.ts (2 hunks)
  • sample/06-file-upload/test/app.e2e-spec.ts (2 hunks)
Additional comments not posted (10)
packages/common/src/interfaces/file-upload.interface.ts (1)

17-18: LGTM!

The new properties size and buffer are appropriate additions to the MultipartFile interface to support the empty file check functionality.

packages/common/src/interceptors/file-upload.interceptor.ts (1)

35-36: LGTM!

The change to set request.raw to request if it is falsy ensures a valid request body, which is a good practice.

packages/common/test/app.e2e-spec.ts (3)

5-6: LGTM!

The new imports for fs and path are necessary for handling file operations in the test cases.


27-43: LGTM!

The new test case for uploading a file with content covers the expected functionality and includes a cleanup procedure to remove the uploaded file.


45-57: LGTM!

The new test case for checking empty file uploads effectively verifies that the system correctly handles and rejects empty file uploads.

sample/06-file-upload/test/app.e2e-spec.ts (3)

5-6: LGTM!

The new imports for fs and path are necessary for handling file operations in the test cases.


27-43: LGTM!

The new test case for uploading a file with content covers the expected functionality and includes a cleanup procedure to remove the uploaded file.


45-57: LGTM!

The new test case for checking empty file uploads effectively verifies that the system correctly handles and rejects empty file uploads.

packages/common/src/controllers/file-upload.controller.ts (2)

18-18: LGTM!

The constructor looks good and initializes the filesService properly.


32-38: LGTM!

The check for empty file uploads is a great addition to improve security and resource efficiency.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Outside diff range and nitpick comments (1)
CONTRIBUTING.md (1)

Line range hint 79-79:
Fix the typo.

Correct the typo in "realted" to "related".

- You can help review open PRs for best backend and devops realted code practices and help the contributors out.
+ You can help review open PRs for best backend and devops related code practices and help the contributors out.
Tools
LanguageTool

[grammar] ~1-~1: This phrase is duplicated. You should probably use “Contributing Guide” only once.
Context: # Contributing Guide - Contributing Guide - [Repository St...

(PHRASE_REPETITION)

Markdownlint

3-3: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


4-4: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


5-5: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


6-6: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


7-7: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


8-8: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


11-11: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


12-12: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


3-3: Column: 1
Hard tabs

(MD010, no-hard-tabs)


4-4: Column: 1
Hard tabs

(MD010, no-hard-tabs)


5-5: Column: 1
Hard tabs

(MD010, no-hard-tabs)


6-6: Column: 1
Hard tabs

(MD010, no-hard-tabs)


7-7: Column: 1
Hard tabs

(MD010, no-hard-tabs)


8-8: Column: 1
Hard tabs

(MD010, no-hard-tabs)


9-9: Column: 1
Hard tabs

(MD010, no-hard-tabs)


10-10: Column: 1
Hard tabs

(MD010, no-hard-tabs)


11-11: Column: 1
Hard tabs

(MD010, no-hard-tabs)


12-12: Column: 1
Hard tabs

(MD010, no-hard-tabs)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5cd6314 and 7d67e65.

Files selected for processing (1)
  • CONTRIBUTING.md (2 hunks)
Additional context used
LanguageTool
CONTRIBUTING.md

[grammar] ~1-~1: This phrase is duplicated. You should probably use “Contributing Guide” only once.
Context: # Contributing Guide - Contributing Guide - [Repository St...

(PHRASE_REPETITION)


[grammar] ~48-~48: Make sure that the noun ‘setup’ is correct. Did you mean the past participle “set up”?
Context: ...opment workflow Once the repository is setup your workflow will look like the follow...

(BE_VB_OR_NN)


[style] ~51-~51: Consider shortening or rephrasing this to strengthen your wording.
Context: ...## For features/bug fixing 1. Initially make changes to packages/common/src 2. Once changes h...

(MAKE_CHANGES)


[uncategorized] ~54-~54: Possible missing comma found.
Context: ... the dependencies. After setting up the dependencies run npm link @samagra-x/stencil (this...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~68-~68: Possible missing comma found.
Context: ...t Before commiting and submitting pull request follow the given steps 1. Lint your co...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~76-~76: This adjective is normally spelled with a hyphen.
Context: ... commit ## Ways to Contribute - As a first time contributor, navigating through the pro...

(TIME_HYPHEN)

Markdownlint
CONTRIBUTING.md

3-3: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


4-4: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


5-5: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


6-6: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


7-7: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


8-8: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


11-11: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


12-12: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


3-3: Column: 1
Hard tabs

(MD010, no-hard-tabs)


4-4: Column: 1
Hard tabs

(MD010, no-hard-tabs)


5-5: Column: 1
Hard tabs

(MD010, no-hard-tabs)


6-6: Column: 1
Hard tabs

(MD010, no-hard-tabs)


7-7: Column: 1
Hard tabs

(MD010, no-hard-tabs)


8-8: Column: 1
Hard tabs

(MD010, no-hard-tabs)


9-9: Column: 1
Hard tabs

(MD010, no-hard-tabs)


10-10: Column: 1
Hard tabs

(MD010, no-hard-tabs)


11-11: Column: 1
Hard tabs

(MD010, no-hard-tabs)


12-12: Column: 1
Hard tabs

(MD010, no-hard-tabs)

Additional comments not posted (3)
CONTRIBUTING.md (3)

57-65: LGTM!

The instructions for writing and running tests are clear and correct.


71-71: Fix the typo.

Correct the typo in "commiting" to "committing".

- 1. Lint your code with `prettier` before your commit via `npm run lint`
+ 1. Lint your code with `prettier` before committing via `npm run lint`

Likely invalid or redundant comment.


2-12: Avoid duplicating the phrase "Contributing Guide".

The phrase "Contributing Guide" is duplicated. Consider removing one instance.

- # Contributing Guide
- - [Contributing Guide](#contributing-guide)
+ # Contributing Guide

Likely invalid or redundant comment.

Tools
Markdownlint

3-3: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


4-4: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


5-5: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


6-6: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


7-7: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


8-8: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


11-11: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


12-12: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


3-3: Column: 1
Hard tabs

(MD010, no-hard-tabs)


4-4: Column: 1
Hard tabs

(MD010, no-hard-tabs)


5-5: Column: 1
Hard tabs

(MD010, no-hard-tabs)


6-6: Column: 1
Hard tabs

(MD010, no-hard-tabs)


7-7: Column: 1
Hard tabs

(MD010, no-hard-tabs)


8-8: Column: 1
Hard tabs

(MD010, no-hard-tabs)


9-9: Column: 1
Hard tabs

(MD010, no-hard-tabs)


10-10: Column: 1
Hard tabs

(MD010, no-hard-tabs)


11-11: Column: 1
Hard tabs

(MD010, no-hard-tabs)


12-12: Column: 1
Hard tabs

(MD010, no-hard-tabs)

CONTRIBUTING.md Outdated
1. Fork the stencil repo
2. Clone your fork into any folder of your choice via `git clone https://github.com/<USERNAME>/stencil.git`
3. The `packages/common` folder corresponds to the npm package `@samagra-x/stencil`
4. Any features additoins or bug fixes are to be done here
Copy link

Choose a reason for hiding this comment

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

Fix the typo.

Correct the typo in "additoins" to "additions".

- 4. Any features additoins or bug fixes are to be done here
+ 4. Any feature additions or bug fixes are to be done here
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
4. Any features additoins or bug fixes are to be done here
4. Any feature additions or bug fixes are to be done here

CONTRIBUTING.md Outdated
1. Lint your code with `prettier` before your commit via `npm run lint`
2. Make sure all test suites are passing before you make your commit/pull request
3. Use `npm run test` and `npm run test:e2e` and make sure all tests are passing before making your commit

## Ways to Contribute

- As a first time contributor, navigating through the project, it can be quite daunting for you. Please make sure to go through the [repository structure](#repository-structure) to understand the project a bit better, if you want to understand the project better.
Copy link

Choose a reason for hiding this comment

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

Use a hyphen for compound adjectives.

Add a hyphen in "first time" to form the compound adjective "first-time".

- As a first time contributor, navigating through the project, it can be quite daunting for you.
+ As a first-time contributor, navigating through the project can be quite daunting for you.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- As a first time contributor, navigating through the project, it can be quite daunting for you. Please make sure to go through the [repository structure](#repository-structure) to understand the project a bit better, if you want to understand the project better.
- As a first time contributor, navigating through the project, it can be quite daunting for you.
+ As a first-time contributor, navigating through the project can be quite daunting for you.
Tools
LanguageTool

[uncategorized] ~76-~76: This adjective is normally spelled with a hyphen.
Context: ... commit ## Ways to Contribute - As a first time contributor, navigating through the pro...

(TIME_HYPHEN)

CONTRIBUTING.md Outdated
@@ -25,6 +32,45 @@
- `docs` this folder contains the documentation for the framework. This is a docusaurus app which can be started for easy reference.


## Development Setup

To set up Stencil in your local development environment; follow the steps listed below
Copy link

Choose a reason for hiding this comment

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

Correct the grammar.

Ensure the noun 'setup' is used correctly. In this context, 'set up' is more appropriate.

- To set up Stencil in your local development environment; follow the steps listed below
+ To set up Stencil in your local development environment, follow the steps listed below:
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
To set up Stencil in your local development environment; follow the steps listed below
To set up Stencil in your local development environment, follow the steps listed below:

CONTRIBUTING.md Outdated

## Development workflow

Once the repository is setup your workflow will look like the following.
Copy link

Choose a reason for hiding this comment

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

Correct the grammar.

Ensure the noun 'setup' is used correctly. In this context, 'set up' is more appropriate.

- Once the repository is setup your workflow will look like the following.
+ Once the repository is set up, your workflow will look like the following:
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Once the repository is setup your workflow will look like the following.
Once the repository is set up, your workflow will look like the following:
Tools
LanguageTool

[grammar] ~48-~48: Make sure that the noun ‘setup’ is correct. Did you mean the past participle “set up”?
Context: ...opment workflow Once the repository is setup your workflow will look like the follow...

(BE_VB_OR_NN)

CONTRIBUTING.md Outdated
1. Initially make changes to `packages/common/src`
2. Once changes have been made to the `src` folder you are supposed to build the package via `npm run build`. This is to be done inside the `packages/common` directory
3. Once changes are made run `npm link` in the `packages/common` directory (this creates a [symlink](https://docs.npmjs.com/cli/v9/commands/npm-link) of your modified package in the node globals and the published package is overriden)
4. Then navigate to the example app in `sample` which corresponds to the changes you have made run `npm install` to set up the dependencies. After setting up the dependencies run `npm link @samagra-x/stencil` (this lets the project know you want to use the modified package and not the published package)
Copy link

Choose a reason for hiding this comment

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

Add a comma for clarity.

Add a comma after "dependencies" for better readability.

- After setting up the dependencies run `npm link @samagra-x/stencil`
+ After setting up the dependencies, run `npm link @samagra-x/stencil`
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
4. Then navigate to the example app in `sample` which corresponds to the changes you have made run `npm install` to set up the dependencies. After setting up the dependencies run `npm link @samagra-x/stencil` (this lets the project know you want to use the modified package and not the published package)
4. Then navigate to the example app in `sample` which corresponds to the changes you have made run `npm install` to set up the dependencies. After setting up the dependencies, run `npm link @samagra-x/stencil` (this lets the project know you want to use the modified package and not the published package)
Tools
LanguageTool

[uncategorized] ~54-~54: Possible missing comma found.
Context: ... the dependencies. After setting up the dependencies run npm link @samagra-x/stencil (this...

(AI_HYDRA_LEO_MISSING_COMMA)

CONTRIBUTING.md Outdated

### Pre-commit checklist

Before commiting and submitting pull request follow the given steps
Copy link

Choose a reason for hiding this comment

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

Add a comma for clarity.

Add a comma after "request" for better readability.

- Before commiting and submitting pull request follow the given steps
+ Before committing and submitting a pull request, follow the given steps:
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Before commiting and submitting pull request follow the given steps
Before committing and submitting a pull request, follow the given steps:
Tools
LanguageTool

[uncategorized] ~68-~68: Possible missing comma found.
Context: ...t Before commiting and submitting pull request follow the given steps 1. Lint your co...

(AI_HYDRA_LEO_MISSING_COMMA)

CONTRIBUTING.md Outdated
Comment on lines 2 to 12
- [Contributing Guide](#contributing-guide)
- [Repository Structure](#repository-structure)
- [Development Setup](#development-setup)
- [Development workflow](#development-workflow)
- [For features/bug fixing](#for-featuresbug-fixing)
- [Writing and running tests](#writing-and-running-tests)
- [Pre-commit checklist](#pre-commit-checklist)
- [Ways to Contribute](#ways-to-contribute)
- [Community Issue Assignment Policy](#community-issue-assignment-policy)
- [Guidelines](#guidelines)
- [Resources](#resources)
Copy link

Choose a reason for hiding this comment

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

Fix unordered list indentation and avoid hard tabs.

Use consistent indentation for unordered lists and replace hard tabs with spaces.

-	- [Repository Structure](#repository-structure)
-	- [Development Setup](#development-setup)
-	- [Development workflow](#development-workflow)
-		- [For features/bug fixing](#for-featuresbug-fixing)
-		- [Writing and running tests](#writing-and-running-tests)
-		- [Pre-commit checklist](#pre-commit-checklist)
-	- [Ways to Contribute](#ways-to-contribute)
-	- [Community Issue Assignment Policy](#community-issue-assignment-policy)
-	- [Guidelines](#guidelines)
-	- [Resources](#resources)
+  - [Repository Structure](#repository-structure)
+  - [Development Setup](#development-setup)
+  - [Development workflow](#development-workflow)
+    - [For features/bug fixing](#for-featuresbug-fixing)
+    - [Writing and running tests](#writing-and-running-tests)
+    - [Pre-commit checklist](#pre-commit-checklist)
+  - [Ways to Contribute](#ways-to-contribute)
+  - [Community Issue Assignment Policy](#community-issue-assignment-policy)
+  - [Guidelines](#guidelines)
+  - [Resources](#resources)
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [Contributing Guide](#contributing-guide)
- [Repository Structure](#repository-structure)
- [Development Setup](#development-setup)
- [Development workflow](#development-workflow)
- [For features/bug fixing](#for-featuresbug-fixing)
- [Writing and running tests](#writing-and-running-tests)
- [Pre-commit checklist](#pre-commit-checklist)
- [Ways to Contribute](#ways-to-contribute)
- [Community Issue Assignment Policy](#community-issue-assignment-policy)
- [Guidelines](#guidelines)
- [Resources](#resources)
- [Contributing Guide](#contributing-guide)
- [Repository Structure](#repository-structure)
- [Development Setup](#development-setup)
- [Development workflow](#development-workflow)
- [For features/bug fixing](#for-featuresbug-fixing)
- [Writing and running tests](#writing-and-running-tests)
- [Pre-commit checklist](#pre-commit-checklist)
- [Ways to Contribute](#ways-to-contribute)
- [Community Issue Assignment Policy](#community-issue-assignment-policy)
- [Guidelines](#guidelines)
- [Resources](#resources)
Tools
Markdownlint

3-3: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


4-4: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


5-5: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


6-6: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


7-7: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


8-8: Expected: 4; Actual: 2
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


11-11: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


12-12: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


3-3: Column: 1
Hard tabs

(MD010, no-hard-tabs)


4-4: Column: 1
Hard tabs

(MD010, no-hard-tabs)


5-5: Column: 1
Hard tabs

(MD010, no-hard-tabs)


6-6: Column: 1
Hard tabs

(MD010, no-hard-tabs)


7-7: Column: 1
Hard tabs

(MD010, no-hard-tabs)


8-8: Column: 1
Hard tabs

(MD010, no-hard-tabs)


9-9: Column: 1
Hard tabs

(MD010, no-hard-tabs)


10-10: Column: 1
Hard tabs

(MD010, no-hard-tabs)


11-11: Column: 1
Hard tabs

(MD010, no-hard-tabs)


12-12: Column: 1
Hard tabs

(MD010, no-hard-tabs)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 7d67e65 and 18c0648.

Files selected for processing (1)
  • packages/common/test/app.e2e-spec.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/common/test/app.e2e-spec.ts

@gnaaruag gnaaruag closed this Jul 8, 2024
@gnaaruag gnaaruag reopened this Jul 8, 2024
@gnaaruag gnaaruag deleted the branch SamagraX-Stencil:main July 8, 2024 10:13
@gnaaruag gnaaruag closed this Jul 8, 2024
@gnaaruag gnaaruag deleted the main branch July 8, 2024 10:13
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.

No check for empty file upload in common/src/file-upload.controller.ts Write tests for file upload feature
1 participant