Skip to content

Fix entire codebase #609

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

Merged
merged 11 commits into from
May 23, 2021
Merged

Fix entire codebase #609

merged 11 commits into from
May 23, 2021

Conversation

raklaptudirm
Copy link
Member

@raklaptudirm raklaptudirm commented May 21, 2021

Welcome to JavaScript community

Open in Gitpod know more

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new JavaScript files are placed inside an existing directory.
  • All filenames should use the UpperCamelCase (PascalCase) style. There should be no spaces in filenames.
    Example:UserProfile.js is allowed but userprofile.js,Userprofile.js,user-Profile.js,userProfile.js are not
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@raklaptudirm
Copy link
Member Author

raklaptudirm commented May 21, 2021

This pull-request is big and fixes many problems in the codebase. The changes have been briefed below for the ease of review. I will merge the branch on approval.

Jobs

  • Ran standard --fix on the entire codebase.
  • Fix unsolved standardjs warnings.
  • Fix Broken tests.

Feats

  • Dynamic-Programming/ZeroOneKnapsack.js: Fixed bad code. Better use of Array.prototype.map()
  • Maths/Polynomial.js: Fixed bad code. Better use of Array.prototype.filter()
  • Sorts/InsertionSort.js: Changed var to let
  • Sorts/IntroSort.js: Changed var to const
  • String/PermutateString.js: Array.prototype.map() -> Array.prototype.forEach()
  • String/LevenshteinDistance.test.js: Fixed broken doctest
  • Linear-Algebra/test/test.js: FIxed BADLY broken test.

Style Updates

  • Conversions/DecimalToBinary.js
  • Conversions/HexToRGB.js
  • Conversions/RomanToDecimal.js
  • Data-Structures/Linked-List/SinglyLinkList.js
  • Data-Structures/Stack/Stack.js
  • Data-Structures/Tree/BinarySearchTree.js
  • Data-Structures/Tree/Trie.js
  • Linear-Algebra/src/la_lib.js
  • Maths/Fibonacci.js
  • Search/LinearSearch.js
  • Sorts/GnomeSort.js
  • Sorts/HeapSort.js
  • Sorts/InsertionSort.js
  • Sorts/IntroSort.js
  • Sorts/MergeSort.js
  • Sorts/QuickSort.js
  • Sorts/RadixSort.js
  • Sorts/SelectionSort.test.js
  • Sorts/ShellSort.js
  • Sorts/TopologicalSort.js
  • Sorts/WiggleSort.js
  • Trees/DepthFirstSearch.js

Tests

This PR, as mentioned, also fixes all the tests. Here are the previous and current test runs:

Previous Run (commit 37ef611):

Test Suites: 2 failed, 46 passed, 48 total
Tests:       1 failed, 177 passed, 178 total
Snapshots:   0 total
Time:        38.376 s
Ran all test suites.

Current Run (commit 2bf0ccf):

Test Suites: 48 passed, 48 total
Tests:       198 passed, 198 total
Snapshots:   0 total
Time:        29.226 s
Ran all test suites.

Fixed Issues

@raklaptudirm raklaptudirm changed the title style: Fixed most styles (according to standardjs) Style fix entire codebase May 21, 2021
@raklaptudirm raklaptudirm marked this pull request as draft May 21, 2021 06:40
@raklaptudirm raklaptudirm changed the title Style fix entire codebase Fix entire codebase May 21, 2021
@raklaptudirm raklaptudirm marked this pull request as ready for review May 21, 2021 07:48
@raklaptudirm raklaptudirm requested review from ruppysuppy, itsvinayak and marsonya and removed request for itsvinayak and ruppysuppy May 21, 2021 07:57
@raklaptudirm raklaptudirm linked an issue May 22, 2021 that may be closed by this pull request
3 tasks
@cclauss cclauss merged commit 74a3be8 into TheAlgorithms:master May 23, 2021
@raklaptudirm raklaptudirm mentioned this pull request May 23, 2021
11 tasks
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.

Tests failing: Files need to be fixed or removed
2 participants