Skip to content

Rewrite: Stepper #1742

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

Draft
wants to merge 71 commits into
base: master
Choose a base branch
from
Draft

Rewrite: Stepper #1742

wants to merge 71 commits into from

Conversation

kavishsathia
Copy link

@kavishsathia kavishsathia commented Feb 28, 2025

Description

This PR aims to rewrite the stepper. The implementation is still in progress.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvements

How to test

Checklist

  • I have tested this code
  • I have updated the documentation

@coveralls
Copy link

coveralls commented Feb 28, 2025

Pull Request Test Coverage Report for Build 13645552196

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 81.126%

Totals Coverage Status
Change from base Build 13624411860: 0.0%
Covered Lines: 10762
Relevant Lines: 12898

💛 - Coveralls

@martin-henz martin-henz marked this pull request as draft February 28, 2025 09:05
Comment on lines +100 to +110
VariableDeclaration: (node: StepperVariableDeclaration) => {
if (node.kind === 'const') {
return (
'Constant ' +
node.declarations.map(ast => ast.id.name).join(', ') +
' declared and substituted into the rest of block'
)
} else {
return '...'
}
},
Copy link

Choose a reason for hiding this comment

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

Add an informative explanation for the var and let declarations.

Comment on lines +155 to +162
const func: StepperArrowFunctionExpression = node.callee as StepperArrowFunctionExpression
if (func.name && isBuiltinFunction(func.name)) {
return `${func.name} runs`
// @ts-expect-error func.body.type can be StepperBlockExpression
} else if (func.body.type === 'BlockStatement') {
if (func.params.length === 0) {
return '() => {...}' + ' runs'
}
Copy link

Choose a reason for hiding this comment

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

I think you should add a comment here to explain what the code below do since the name is not indicative.

Suggested change
const func: StepperArrowFunctionExpression = node.callee as StepperArrowFunctionExpression
if (func.name && isBuiltinFunction(func.name)) {
return `${func.name} runs`
// @ts-expect-error func.body.type can be StepperBlockExpression
} else if (func.body.type === 'BlockStatement') {
if (func.params.length === 0) {
return '() => {...}' + ' runs'
}
// Determine whether the called function is built-in or not and create explanation accordingly
const func: StepperArrowFunctionExpression = node.callee as StepperArrowFunctionExpression
if (func.name && isBuiltinFunction(func.name)) {
return `${func.name} runs`
// @ts-expect-error func.body.type can be StepperBlockExpression
} else if (func.body.type === 'BlockStatement') {
if (func.params.length === 0) {
return '() => {...}' + ' runs'
}

Copy link

Choose a reason for hiding this comment

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

I think this files is long and really lacking comments. However, no problem with the implementation.

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.

5 participants