Update BestQualities.tsx - #102
Conversation
| import {Feature} from './Qualities'; | ||
| import remotionLogo from './remotion-logo.png'; | ||
|
|
||
| const Container = styled(AbsoluteFill)`import { |
There was a problem hiding this comment.
❌ New issue: Lines of Code in a Single File
This module has 1065 lines of code, improve code health by reducing it to 1000
| export const BestQualities: React.FC = () => { | ||
| const frame = useCurrentFrame(); | ||
| const {fps} = useVideoConfig(); | ||
|
|
||
| const logoProgress = spring({ | ||
| frame: frame - 180, | ||
| fps, | ||
| config: { | ||
| damping: 200, | ||
| }, | ||
| }); | ||
|
|
||
| return ( | ||
| <Container> | ||
| <Row> | ||
| <Left> | ||
| {programmingFeatures.map((f, index) => { | ||
| return ( | ||
| <Feature | ||
| color1="#f5ad43" | ||
| color2="#fd764a" | ||
| title={index === 0} | ||
| x={500} | ||
| index={index + 40} | ||
| fadeOutIndex={index * 0.66} | ||
| > | ||
| {f} | ||
| </Feature> | ||
| ); | ||
| })} | ||
| </Left> | ||
| <Spacer /> | ||
| <Right> | ||
| {[ | ||
| 'Video editing\nfeatures', | ||
| 'Visual Preview', | ||
| 'Timeline Scrubbing', | ||
| 'Video footage export', | ||
| 'Animation primitives', | ||
| 'Composition primitives', | ||
| 'Layers', | ||
| 'Dynamic FPS', | ||
| 'Audio support (Alpha)', | ||
| 'MP4 export', | ||
| ].map((f, index) => { | ||
| return ( | ||
| <Feature | ||
| color1="#5757f5" | ||
| color2="#00005b" | ||
| title={index === 0} | ||
| x={-500} | ||
| index={index + programmingFeatures.length + 80} | ||
| fadeOutIndex={index * 0.66} | ||
| > | ||
| {f} | ||
| </Feature> | ||
| ); | ||
| })} | ||
| </Right> | ||
| </Row> | ||
| <AbsoluteFill style={{justifyContent: 'center', alignItems: 'center'}}> | ||
| <Img | ||
| src={remotionLogo} | ||
| style={{ | ||
| height: 400, | ||
| width: 400, | ||
| transform: `scale(${logoProgress})`, | ||
| }} | ||
| /> | ||
| </AbsoluteFill> | ||
| </Container> | ||
| ); | ||
| }; |
There was a problem hiding this comment.
❌ New issue: Code Duplication
The module contains 15 functions with similar structure: BestQualities:React.FC,BestQualities:React.FC,BestQualities:React.FC,BestQualities:React.FC and 11 more functions
| import {Feature} from './Qualities'; | ||
| import remotionLogo from './remotion-logo.png'; | ||
|
|
||
| const Container = styled(AbsoluteFill)`import { |
There was a problem hiding this comment.
❌ New issue: Overall Function Size
The median function size in this module is 71.0 LOC, threshold = 50.0
There was a problem hiding this comment.
Gates Failed
Prevent hotspot decline
(1 hotspot with Lines of Code in a Single File, Code Duplication, Overall Function Size)
Enforce advisory code health rules
(1 file with Lines of Code in a Single File, Code Duplication, Overall Function Size)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| BestQualities.tsx | 3 rules in this hotspot | 10.00 → 7.11 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BestQualities.tsx | 3 advisory rules | 10.00 → 7.11 | Suppress |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
No description provided.