<commit_before><?xml version="1.0"?>
<!DOCTYPE module PUBLIC
          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!-- Checkstyle configuration that checks the sun coding conventions from:
  - the Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/index.html
  - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - the Javadoc
  guidelines at http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
  - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
  - some best practices Checkstyle is very configurable. Be sure to read the
  documentation at http://checkstyle.sf.net (or in your downloaded distribution).
  Most Checks are configurable, be sure to consult the documentation. To completely
  disable a check, just comment it out or delete it from the file. Finally,
  it is worth reading the documentation. -->

<module name="Checker">
  <!-- If you set the basedir property below, then all reported file names
    will be relative to the specified directory. See http://checkstyle.sourceforge.net/5.x/config.html#Checker
    <property name="basedir" value="${basedir}"/> -->

  <property
    name="fileExtensions"
    value="java, properties, xml" />

  <!-- Checks that a package-info.java file exists for each package. -->
  <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
  <!-- <module name="JavadocPackage" /> -->

  <!-- Checks whether files end with a new line. -->
  <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
  <module name="NewlineAtEndOfFile" />

  <!-- Checks that property files contain the same keys. -->
  <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
  <module name="Translation" />

  <!-- Checks for Size Violations. -->
  <!-- See http://checkstyle.sf.net/config_sizes.html -->
  <module name="FileLength" />

  <!-- Checks for whitespace -->
  <!-- See http://checkstyle.sf.net/config_whitespace.html -->
  <module name="FileTabCharacter" />

  <!-- Miscellaneous other checks. -->
  <!-- See http://checkstyle.sf.net/config_misc.html -->
  <module name="RegexpSingleline">
    <property
      name="format"
      value="\s+$" />
    <property
      name="minimum"
      value="0" />
    <property
      name="maximum"
      value="0" />
    <property
      name="message"
      value="Line has trailing spaces." />
  </module>

  <!-- Checks for Headers -->
  <!-- See http://checkstyle.sf.net/config_header.html -->
  <!-- <module name="Header"> -->
  <!-- <property name="headerFile" value="${checkstyle.header.file}"/> --> Morozzzko wants to merge 24 commits into master from particle_class
+401 −7
Conversation 0 Commits 24 Files changed 4
None yet
No milestone

@Morozzzko Morozzzko
3 participants
@Morozzzko
@srdp11
@gim-
Notifications

You’re receiving notifications because you were assigned.
Lock conversation
@Morozzzko
Collaborator
Morozzzko commented 2 hours ago

No description provided.
	@srdp11 	Add class SParticle and tests for it 			bd07650
@Morozzzko
Collaborator
Morozzzko commented on src/particles/SParticle.java in bd07650 4 days ago

It would be nice to have a method which just converts Particle into a byte stream or something.
I don't really want functions with side effects.
Owner
gim- replied 4 days ago

См. Serializable
@gim-
Owner
gim- commented on src/particles/SParticle.java in bd07650 4 days ago

    Декларация полей должна быть в самом верху класса
    Никогда не делай декларацию двух полей в одной строке

@gim-
Owner
gim- commented on src/particles/SParticle.java in bd07650 4 days ago

Назови просто Particle. Либо, если S означает что-то конкретное, дай полное а не сокращённое название если нужно.
@gim-
Owner
gim- commented on src/particles/SParticle.java in bd07650 4 days ago

Все исходники должны находиться исключительно в src/main/java/eu/mivrenik/particles/.
См. Introduction to the Standard Directory Layout
@gim-
Owner
gim- commented on src/particles/SParticleTest.java in bd07650 4 days ago

Все тесты должны находиться исключительно в src/test/java/eu/mivrenik/particles/.
См. Introduction to the Standard Directory Layout
@gim-
Owner
gim- commented on src/particles/SParticle.java in bd07650 4 days ago

В джаве лучше перезаписать уже существующий метод Object#equals()
srdp11 and others added some commits 3 days ago
	@srdp11 	Class SParticle was renamed to Particle; Source files for class and t…
			a32d903
	@srdp11 	Fields declaration has been modified in accordance with the codestyle 			e810cfb
	@srdp11 	Method equalTo was renamed to equals 			fa08281
	@srdp11 	Tests was included to package 			0e29e31
	@srdp11 	Specificator private was removed from all variables of the class Part…
			5fb4de1
	@gim- 	Generate serial version UID for serializable class `Particle` 			8ef1bf4
	@gim- 	ParticleTest: Close input stream 			596ccba
	@gim- 	Move `Particle` class to seperate `model` package 			34aeb77
@gim-
Owner
gim- commented on src/main/java/eu/mivrenik/particles/Particle.java in fa08281 3 days ago • edited

Тут ты перегрузил метод equals(), а нужно перезаписать. Чтобы избежать таких ситуаций, всегда добавляй аннотацию @Override к перезаписываемым методам, чтобы IDE и компилятор сразу сообщали об ошибке. Измени тип параметра с Particle на Object, затем в теле этого метода проверь, является ли аргумент типом Particle перед остальными проверками.
srdp11 added some commits 3 days ago
	@srdp11 	Add checkings to the method equals() 			da6735e
	@srdp11 	Add prefix @Override to the method equals() 			d9444dd
	@srdp11 	Add generator for object of class Particle 			0da4439
	@srdp11 	Add method nextParticleSpecifiedCoordinates: generate particle with f…
			6cb6cb7
	@srdp11 	Refactoring test's code 			fdca72c
@gim-
Owner
gim- commented on src/test/java/eu/mivrenik/particles/model/ParticleTest.java in 0da4439 3 days ago • edited

Это конфигурация твоей IDE или ты сам делаешь? Не нужно импортировать всё содержимое пакета, если пользуешься лишь небольшим процентом содержимого. В нормальных IDE есть функция организации импортов -- в Eclipse это ctrl+shift+o, в Intellij ctrl+alt+o.
@srdp11
Collaborator
srdp11 commented on 0da4439 2 days ago

Я пользуюсь IntelliJ. Обычно руками ничего не подключаю, ибо при объявлении неизвестных классов IDE сама предлагает мне источники для их импорта. Если честно, то я не помню, почему я вдруг так заменил. Все исправлю.
	@srdp11 	now import only part of the package java.io 			7b75d7a
@Morozzzko Morozzzko self-assigned this 2 hours ago
Morozzzko added some commits an hour ago
	@Morozzzko 	Update .gitignore to ignore IDEA-specific stuff 			bf24315
	@Morozzzko 	Rename Particle attributes 			be1fa1b
	@Morozzzko 	Add copy constructor 			42088f4
	@Morozzzko 	Rename getVelocity into getSpeed 			157cc90
	@Morozzzko 	Rename methods and return this from setters 			b86037f
	@Morozzzko 	Add a failing equals test 			ddbd685
	@Morozzzko 	Add id check in Particle.equals 			348a631
	@Morozzzko 	Update style checks and make (most of the) code match them 			a453f35
	@Morozzzko 	Regenerate two Particle methods and get rid of silly style rules 			9b76658

Add more commits by pushing to the particle_class branch on gim-/particles-in-box-java.
This branch has conflicts that must be resolved
to resolve conflicts before continuing.

or view

.
@Morozzzko

Attach files by dragging & dropping or

.
Styling with Markdown is supported
ProTip! Add comments to specific lines under Files changed.

  <!-- <property name="fileExtensions" value="java"/> -->
  <!-- </module> -->

  <module name="TreeWalker">

    <!-- Checks for Javadoc comments. -->
    <!-- See http://checkstyle.sf.net/config_javadoc.html --><commit_msg>Remove bullshit from `checkstyle.xml`<commit_after><?xml version="1.0"?>
<!DOCTYPE module PUBLIC
          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!-- Checkstyle configuration that checks the sun coding conventions from:
  - the Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/index.html
  - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - the Javadoc
  guidelines at http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
  - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
  - some best practices Checkstyle is very configurable. Be sure to read the
  documentation at http://checkstyle.sf.net (or in your downloaded distribution).
  Most Checks are configurable, be sure to consult the documentation. To completely
  disable a check, just comment it out or delete it from the file. Finally,
  it is worth reading the documentation. -->

<module name="Checker">
  <!-- If you set the basedir property below, then all reported file names
    will be relative to the specified directory. See http://checkstyle.sourceforge.net/5.x/config.html#Checker
    <property name="basedir" value="${basedir}"/> -->

  <property
    name="fileExtensions"
    value="java, properties, xml" />

  <!-- Checks that a package-info.java file exists for each package. -->
  <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
  <!-- <module name="JavadocPackage" /> -->

  <!-- Checks whether files end with a new line. -->
  <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
  <module name="NewlineAtEndOfFile" />

  <!-- Checks that property files contain the same keys. -->
  <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
  <module name="Translation" />

  <!-- Checks for Size Violations. -->
  <!-- See http://checkstyle.sf.net/config_sizes.html -->
  <module name="FileLength" />

  <!-- Checks for whitespace -->
  <!-- See http://checkstyle.sf.net/config_whitespace.html -->
  <module name="FileTabCharacter" />

  <!-- Miscellaneous other checks. -->
  <!-- See http://checkstyle.sf.net/config_misc.html -->
  <module name="RegexpSingleline">
    <property
      name="format"
      value="\s+$" />
    <property
      name="minimum"
      value="0" />
    <property
      name="maximum"
      value="0" />
    <property
      name="message"
      value="Line has trailing spaces." />
  </module>

  <!-- Checks for Headers -->
  <!-- See http://checkstyle.sf.net/config_header.html -->
  <!-- <module name="Header"> -->
  <!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
  <!-- <property name="fileExtensions" value="java"/> -->
  <!-- </module> -->

  <module name="TreeWalker">

    <!-- Checks for Javadoc comments. -->
    <!-- See http://checkstyle.sf.net/config_javadoc.html -->
{'fraction_non_alphanumeric': 0.10741640201756025, 'fraction_numerical': 0.021203063702596676, 'mean_word_length': 3.548428207306712, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 2, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4461003', 'n_tokens_mistral': 3692, 'n_tokens_neox': 3570, 'n_words': 1106}