neet/refined-itsukara-link

View on GitHub

Showing 278 of 278 total issues

Avoid too many return statements within this function.
Open

  return false;
Severity: Major
Found in packages/@neet/vschedule-client/src/utils/overlap.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return avatarGroupTrio(src, alt, rest);
    Severity: Major
    Found in packages/@neet/vschedule-client/src/components/ui/Avatar/AvatarGroup.tsx - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

        return avatarGroupQuartet(src, alt, rest);
      Severity: Major
      Found in packages/@neet/vschedule-client/src/components/ui/Avatar/AvatarGroup.tsx - About 30 mins to fix

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

        const fetchProxyLivers = async () =>
          fetch('/api/v1.2/livers.json').then(
            async (r) => (await r.json()) as API.LiversResponse,
          );
        Severity: Minor
        Found in packages/@neet/vschedule-client/src/api-legacy.ts and 2 other locations - About 30 mins to fix
        packages/@neet/vschedule-client/src/api-legacy.ts on lines 22..25
        packages/@neet/vschedule-client/src/api-legacy.ts on lines 27..30

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        export class CreateUserAlreadyExists extends AppError {
          readonly name = 'CreateUserAlreadyExists';
        
          constructor(email: string) {
            super(`User with email ${email} is already existing`);
        Severity: Minor
        Found in packages/@neet/vschedule-api/src/app/user/create-user.ts and 1 other location - About 30 mins to fix
        packages/@neet/vschedule-api/src/app/user/create-user.ts on lines 17..23

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

                  <li>
                    <UILink
                      variant="wash"
                      target="_blank"
                      rel="noreferrer"
        packages/@neet/vschedule-client/src/components/app/Imprint/Imprint.tsx on lines 45..54
        packages/@neet/vschedule-client/src/components/app/Imprint/Imprint.tsx on lines 79..88

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        export class CreateUserNotAllowedEmail extends AppError {
          readonly name = 'CreateUserNotAllowedEmail';
        
          constructor(email: string) {
            super(`Email ${email} is not allowed to create a user`);
        Severity: Minor
        Found in packages/@neet/vschedule-api/src/app/user/create-user.ts and 1 other location - About 30 mins to fix
        packages/@neet/vschedule-api/src/app/user/create-user.ts on lines 9..15

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

                  <li>
                    <UILink
                      variant="wash"
                      href="https://itsukara.link"
                      target="_blank"
        packages/@neet/vschedule-client/src/components/app/Imprint/Imprint.tsx on lines 45..54
        packages/@neet/vschedule-client/src/components/app/Imprint/Imprint.tsx on lines 62..71

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

                  <li>
                    <UILink
                      variant="wash"
                      as="a"
                      href="https://forms.gle/1tg2n5KB9fcroJcc7"
        packages/@neet/vschedule-client/src/components/app/Imprint/Imprint.tsx on lines 62..71
        packages/@neet/vschedule-client/src/components/app/Imprint/Imprint.tsx on lines 79..88

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

          responses: {
            200: {
              description: '成功時のレスポンスです',
              content: {
                'application/json': {
        Severity: Minor
        Found in packages/@neet/vschedule-api-spec/src/paths/auth.ts and 1 other location - About 30 mins to fix
        packages/@neet/vschedule-api-spec/src/paths/rest/v1/streams.ts on lines 17..27

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function create has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

          async create(channel: Channel): Promise<void> {
            if (channel instanceof ChannelYoutube) {
              await this._prisma.channel.create({
                data: {
                  id: channel.id.value,

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function ActiveLivers has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        export const ActiveLivers = (props: ActiveLiversProps): JSX.Element => {
          const { upcomingEvents: events } = props;
          const [expanded, setExpanded] = useState(false);
        
          useEffect(() => {

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function invoke has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

          async invoke(command: ShowOrganizationCommand): Promise<OrganizationDto> {
            if ('id' in command) {
              const organizationId = new OrganizationId(command.id);
              const organization = await this._organizationQueryService.query(
                organizationId,
        Severity: Minor
        Found in packages/@neet/vschedule-api/src/app/organization/show-organization.ts - About 25 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function update has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

          async update(channel: Channel): Promise<void> {
            if (channel instanceof ChannelYoutube) {
              await this._prisma.channel.update({
                where: {
                  id: channel.id.value,

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function Timetable has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        export const Timetable = (props: TimetableProps): JSX.Element => {
          const { schedules, swapDelta, loading } = props;
        
          const { ref, scale, startAt, setFocusedAt, setFocusedAtRaw } = useTimetable();
          const { x: fromLeft } = useScroll(ref);

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function Crown has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        export const Crown = (props: CrownProps): JSX.Element => {
          const { genre, genres, loading, onGenreChange } = props;
          const { focusedAt, startAt, endAt, setFocusedAt } = useTimetable();
        
          // "today" or "yesterday" "tomorrow" here are defined as relative from the focus
        Severity: Minor
        Found in packages/@neet/vschedule-client/src/components/app/Crown/Crown.tsx - About 25 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function Events has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        const Events = (props: EventsProps): JSX.Element | null => {
          const { events, loading } = useEvents();
          const upcomingEvents = useUpcomingEvents();
          const genreQuery = useGenreQueryParam();
          const [genre, setGenre] = useState(genreQuery ?? GENRE_ALL);
        Severity: Minor
        Found in packages/@neet/vschedule-client/src/pages/index.tsx - About 25 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function invoke has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

          async invoke(command: ShowPerformerCommand): Promise<PerformerDto> {
            if ('id' in command) {
              const performerId = new PerformerId(command.id);
              const performer = await this._performerQueryService.query(performerId);
        
        
        Severity: Minor
        Found in packages/@neet/vschedule-api/src/app/performer/show-performer.ts - About 25 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Severity
        Category
        Status
        Source
        Language