Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Implement #6172: parameter/argument warning #6183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Implement #6172: parameter/argument warning #6183

wants to merge 1 commit into from

Conversation

lucaswerkmeister
Copy link
Contributor

If the parameter is not assigned by a BME with the same name, but a different argument is a BME with the same name, issue a warning.

Warnings in language module and SDK: gist

Closes #6172.

If the parameter is not assigned by a BME with the same name, but a
different argument is a BME with the same name, issue a warning.
@CeylonBuildBot
Copy link

Can one of the admins verify this patch? (see README)

@lucaswerkmeister
Copy link
Contributor Author

Thoughts @gavinking / @jvasileff / anyone else?

@jvasileff
Copy link
Contributor

I was skeptical, but encouraged by the results on the SDK. It seems this could be removed or made optional in a future release if it doesn't work out.

lucaswerkmeister added a commit to lucaswerkmeister/ceylon-sdk that referenced this pull request May 5, 2016
- Many, MANY tests were calling assertEquals with the wrong argument
  order: assertEquals(expected, actual), whereas the correct order with
  positional arguments is assertEquals(actual, expected). A few of these
  mistakes were caught by eclipse-archived/ceylon#6183. I attempted to fix them in
  a way that would be consistent with other tests in the file, so
  sometimes I swapped the parameters, and sometimes I changed the
  invocation to use named arguments.
- Some tests did manual exception handling instead of using
  assertThatException.
- Some tests could be parameterized (eclipse-archived#159).
lucaswerkmeister added a commit to lucaswerkmeister/ceylon-sdk that referenced this pull request May 9, 2016
- Many, MANY tests were calling assertEquals with the wrong argument
  order: assertEquals(expected, actual), whereas the correct order with
  positional arguments is assertEquals(actual, expected). A few of these
  mistakes were caught by eclipse-archived/ceylon#6183. I attempted to fix them in
  a way that would be consistent with other tests in the file, so
  sometimes I swapped the parameters, and sometimes I changed the
  invocation to use named arguments.
- Some tests did manual exception handling instead of using
  assertThatException.
- Some tests could be parameterized (eclipse-archived#159).
- Some date_* variables were misspelled as data_*.
@gavinking
Copy link
Contributor

Very interesting idea @lucaswerkmeister. I guess this seems useful.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants