objectionary/eo

View on GitHub

Showing 187 of 187 total issues

Method toPhi has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

@SuppressWarnings("PMD.CognitiveComplexity")
private static Phi toPhi(final Object obj) {
final Phi phi;
final Phi eolang = Phi.Φ.take("org").take("eolang");
if (obj instanceof Boolean) {
Severity: Minor
Found in eo-runtime/src/main/java/org/eolang/Data.java - About 2 hrs to fix

File TranspileMojo.java has 252 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
* SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
* SPDX-License-Identifier: MIT
*/
package org.eolang.maven;
Severity: Minor
Found in eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java - About 2 hrs to fix

    Method lint has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    private void lint() throws IOException {
    final long start = System.currentTimeMillis();
    final Collection<TjForeign> tojos = this.scopedTojos().withShaken();
    final ConcurrentHashMap<Severity, Integer> counts = new ConcurrentHashMap<>();
    counts.putIfAbsent(Severity.CRITICAL, 0);
    Severity: Major
    Found in eo-maven-plugin/src/main/java/org/eolang/maven/LintMojo.java - About 2 hrs to fix

      Method exec has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      @Override
      public void exec() {
      final List<String> errors = new CopyOnWriteArrayList<>();
      final Path home = this.unphiOutputDir.toPath();
      final Iterable<Directive> metas = new Phi.Metas(this.unphiMetas);
      Severity: Minor
      Found in eo-maven-plugin/src/main/java/org/eolang/maven/UnphiMojo.java - About 1 hr to fix

        Method downloaded has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        @SuppressWarnings("PMD.CognitiveComplexity")
        private static File downloaded(final String uri, final Path path, final Path tmp) {
        final File abs = path.toFile().getAbsoluteFile();
        synchronized (tmp) {
        if (!abs.exists()) {
        Severity: Minor
        Found in eo-parser/src/main/java/org/eolang/parser/StrictXmir.java - About 1 hr to fix

          Method killThem has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

          @SuppressWarnings("PMD.CognitiveComplexity")
          private int killThem(final Iterable<TjPlaced> all) throws IOException {
          int unplaced = 0;
          for (final TjPlaced tojo : all) {
          final String related = tojo.related();
          Severity: Minor
          Found in eo-maven-plugin/src/main/java/org/eolang/maven/UnplaceMojo.java - About 1 hr to fix

          Method downloaded has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

          @SuppressWarnings("PMD.CognitiveComplexity")
          private static File downloaded(final String uri, final Path path, final Path tmp) {
          final File abs = path.toFile().getAbsoluteFile();
          synchronized (tmp) {
          if (!abs.exists()) {
          Severity: Minor
          Found in eo-parser/src/main/java/org/eolang/parser/StrictXmir.java - About 1 hr to fix

          Method execute has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          @Override
          @SuppressWarnings("PMD.CognitiveComplexity")
          public final void execute() throws MojoFailureException {
          StaticLoggerBinder.getSingleton().setMavenLog(this.getLog());
          if (this.skip) {
          Severity: Minor
          Found in eo-maven-plugin/src/main/java/org/eolang/maven/SafeMojo.java - About 1 hr to fix

            Method iterator has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            @Override
            public Iterator<Directive> iterator() {
            final String when = ZonedDateTime.now(ZoneOffset.UTC).format(
            DateTimeFormatter.ISO_INSTANT
            );
            Severity: Minor
            Found in eo-parser/src/main/java/org/eolang/parser/DrProgram.java - About 1 hr to fix

              Method toPhi has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              @SuppressWarnings("PMD.CognitiveComplexity")
              private static Phi toPhi(final Object obj) {
              final Phi phi;
              final Phi eolang = Phi.Φ.take("org").take("eolang");
              if (obj instanceof Boolean) {
              Severity: Minor
              Found in eo-runtime/src/main/java/org/eolang/Data.java - About 1 hr to fix

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

                /*
                * SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
                * SPDX-License-Identifier: MIT
                */
                /*
                eo-runtime/src/main/java/EOorg/EOeolang/EOsys/Win32/SendFuncCall.java on lines 1..54

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

                /*
                * SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
                * SPDX-License-Identifier: MIT
                */
                 
                 
                eo-runtime/src/main/java/EOorg/EOeolang/EOsys/Posix/SendSyscall.java on lines 1..52

                Method lambda has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                @Override
                public Phi lambda() {
                final Phi match = this.take(Attr.RHO);
                final InputStream bais = new ByteArrayInputStream(
                new Dataized(match.take(Attr.RHO).take("serialized")).take()

                  Method exec has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  @Override
                  public void exec() throws IOException {
                  final Collection<Dep> deps = this.deps();
                  final Path target = this.targetDir.toPath().resolve(ResolveMojo.DIR);
                  for (final Dep dep : deps) {
                  Severity: Minor
                  Found in eo-maven-plugin/src/main/java/org/eolang/maven/ResolveMojo.java - About 1 hr to fix

                    Method killThem has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    @SuppressWarnings("PMD.CognitiveComplexity")
                    private int killThem(final Iterable<TjPlaced> all) throws IOException {
                    int unplaced = 0;
                    for (final TjPlaced tojo : all) {
                    final String related = tojo.related();
                    Severity: Minor
                    Found in eo-maven-plugin/src/main/java/org/eolang/maven/UnplaceMojo.java - About 1 hr to fix

                      Method lambda has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      @Override
                      public Phi lambda() {
                      final String format = new Dataized(this.take("format")).asString();
                      final Phi retriever = Expect.at(this, "args")
                      .that(phi -> phi.take("at"))
                      Severity: Minor
                      Found in eo-runtime/src/main/java/EOorg/EOeolang/EOtxt/EOsprintf.java - About 1 hr to fix

                        Method pulled has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        private Path pulled(final String object, final Path base, final String hsh) throws IOException {
                        final String semver = this.plugin.getVersion();
                        final Path target = new Place(object).make(base, AssembleMojo.EO);
                        final Supplier<Path> che = new CachePath(
                        this.cache.toPath().resolve(PullMojo.CACHE),
                        Severity: Minor
                        Found in eo-maven-plugin/src/main/java/org/eolang/maven/PullMojo.java - About 1 hr to fix

                          Method exitError has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                          Open

                          private void exitError(final String msg, final Throwable exp)
                          throws MojoFailureException {
                          if (!this.unrollExitError) {
                          return;
                          }
                          Severity: Minor
                          Found in eo-maven-plugin/src/main/java/org/eolang/maven/SafeMojo.java - About 1 hr to fix

                          Method exec has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                          Open

                          @Override
                          public void exec() throws IOException {
                          final Collection<Dep> deps = this.deps();
                          final Path target = this.targetDir.toPath().resolve(ResolveMojo.DIR);
                          for (final Dep dep : deps) {
                          Severity: Minor
                          Found in eo-maven-plugin/src/main/java/org/eolang/maven/ResolveMojo.java - About 1 hr to fix

                          Method probe has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                          Open

                          private void probe() throws IOException {
                          final long start = System.currentTimeMillis();
                          final Collection<String> probed = new HashSet<>(0);
                          final Collection<TjForeign> tojos = this.scopedTojos().unprobed();
                          for (final TjForeign tojo : tojos) {
                          Severity: Minor
                          Found in eo-maven-plugin/src/main/java/org/eolang/maven/ProbeMojo.java - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language