objectionary/eo

View on GitHub

Showing 118 of 187 total issues

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

      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

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

                @Override
                public void exec() throws IOException {
                if (this.generateGraphFiles && !this.generateXemblyFiles) {
                throw new IllegalStateException(
                "Setting generateGraphFiles and not setting generateXemblyFiles has no effect because .graph files require .xe files"
                Severity: Minor
                Found in eo-maven-plugin/src/main/java/org/eolang/maven/SodgMojo.java - About 1 hr to fix

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

                @Override
                public Iterator<Dep> iterator() {
                final Collection<TjForeign> list = this.tojos.dependencies();
                Logger.debug(
                this, "%d suitable tojo(s) found out of %d",
                Severity: Minor
                Found in eo-maven-plugin/src/main/java/org/eolang/maven/DpsDefault.java - About 1 hr to fix

                  Method probe has 40 lines of code (exceeds 25 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

                    Method enterData has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    @Override
                    @SuppressWarnings("PMD.ConfusingTernary")
                    public void enterData(final EoParser.DataContext ctx) {
                    final Supplier<String> data;
                    final String base;
                    Severity: Minor
                    Found in eo-parser/src/main/java/org/eolang/parser/XeEoListener.java - About 1 hr to fix

                      Method write has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      void write(final int identifier, final int offset, final byte[] data) {
                      synchronized (this.blocks) {
                      if (!this.blocks.containsKey(identifier)) {
                      throw new ExFailure(
                      String.format(
                      Severity: Minor
                      Found in eo-runtime/src/main/java/EOorg/EOeolang/Heaps.java - About 1 hr to fix

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

                        @Override
                        public void exec() {
                        if (this.sourcesDir == null) {
                        throw new IllegalArgumentException(
                        String.format("sourcesDir is null. Please specify a valid sourcesDir for %s", this)
                        Severity: Minor
                        Found in eo-maven-plugin/src/main/java/org/eolang/maven/RegisterMojo.java - About 1 hr to fix

                          Method pull has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          @SuppressWarnings("PMD.PrematureDeclaration")
                          private void pull() throws IOException {
                          final long start = System.currentTimeMillis();
                          final Collection<TjForeign> tojos = this.scopedTojos().withoutSources();
                          final Collection<String> names = new ArrayList<>(0);
                          Severity: Minor
                          Found in eo-maven-plugin/src/main/java/org/eolang/maven/PullMojo.java - About 1 hr to fix

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

                            @Override
                            public Iterator<Dep> iterator() {
                            try {
                            final Collection<Dep> all = new ArrayList<>(0);
                            if (Files.exists(this.file)) {
                            Severity: Minor
                            Found in eo-maven-plugin/src/main/java/org/eolang/maven/DpsDepgraph.java - About 1 hr to fix

                              Method parsed has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              @SuppressWarnings({"PMD.AvoidCatchingGenericException", "PMD.ExceptionAsFlowControl"})
                              private int parsed(final TjForeign tojo) throws Exception {
                              final Path source = tojo.source();
                              final String name = tojo.identifier();
                              final Path base = this.targetDir.toPath().resolve(ParseMojo.DIR);
                              Severity: Minor
                              Found in eo-maven-plugin/src/main/java/org/eolang/maven/ParseMojo.java - About 1 hr to fix

                                Method inside has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                private String inside() {
                                return new Unchecked<>(
                                new Mapped<>(
                                Text::asString,
                                new FirstOf<>(
                                Severity: Minor
                                Found in eo-maven-plugin/src/main/java/org/eolang/maven/ChText.java - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language