Eli Schwartz
8947352889
fix various flake8 whitespace errors
2021-10-27 09:51:52 -04:00
Eli Schwartz
4ab70c5512
fix extra whitespace
...
discovered via flake8 --select E303
2021-10-04 16:29:31 -04:00
Eli Schwartz
5a8e066c56
remove useless variables that are no longer or were never used
2021-10-04 16:29:31 -04:00
Eli Schwartz
c43bad2369
fix untested codepath? add:item() is surely a typo, not a real function
2021-09-14 15:50:29 -04:00
Dylan Baker
b60bd0e299
pyllint: enable consider-user-enumerate
...
This caught a couple of cases of us doing:
```python
for i in range(len(x)):
v = x[i]
```
which are places to use enumerate instead.
It also caught a couple of cases of:
```python
assert len(x) == len(y)
for i in range(len(x)):
xv = x[i]
yv = y[i]
```
Which should instead be using zip()
```python
for xv, yv in zip(x, y):
...
```
2021-08-31 16:28:54 -04:00
Dylan Baker
4d7031437c
pylint: turn on superflous-parens
...
We have a lot of these. Some of them are harmless, if unidiomatic, such
as `if (condition)`, others are potentially dangerous `assert(...)`, as
`assert(condtion)` works as expected, but `assert(condition, message)`
will result in an assertion that never triggers, as what you're actually
asserting is `bool(tuple[2])`, which will always be true.
2021-08-31 16:28:54 -04:00
Dylan Baker
278942a447
pylint: enable consider-iterating-dictionary
...
This didn't actually catch what it's supposed to, which is cases of:
```python
for x in dict.keys():
y = dict[x]
```
But it did catch one unnecessary use of keys(), and one case where we
were doing something in an inefficient way. I've rewritten:
```python
if name.value in [x.value for x in self.kwargs.keys() if isinstance(x, IdNode)]:
```
as
``python
if any((isinstance(x, IdNode) and name.value == x.value) for x in self.kwargs):
```
Which avoids doing two iterations, one to build the list, and a
second to do a search for name.value in said list, which does a single
short circuiting walk, as any returns as soon as one check returns True.
2021-08-31 16:28:54 -04:00
Jussi Pakkanen
3f380b8e1d
Fix duplicated frameworks in the Xcode backend.
2021-08-21 22:33:47 +03:00
Jussi Pakkanen
85d102bc6e
Fix multiple generators in target in Xcode.
2021-08-21 22:33:47 +03:00
Jussi Pakkanen
267d5385d4
Path special casing for the Xcode backend.
2021-08-21 22:33:47 +03:00
Jussi Pakkanen
12e7b3afcf
Handle .C extension in Xcode.
2021-08-21 22:33:47 +03:00
Dylan Baker
0ca0e6116c
backends: remove unused name parameter from as_meson_exe_cmdline
...
This parameter isn't used, at all, so just remove it
2021-08-20 18:57:19 +02:00
Eli Schwartz
59d4f771d2
editorconfig: add setting to trim trailing whitespace
...
and clean up all outstanding issues
Skip 'test cases/common/141 special characters/meson.build' since it
intentionally uses trailing newlines.
2021-08-15 09:36:18 -04:00
Eli Schwartz
dd31891c1f
more f-strings too complex to be caught by pyupgrade
2021-07-05 17:55:04 +03:00
Eli Schwartz
48ebfa9a99
another pyupgrade pass
2021-06-07 16:51:47 -04:00
Jussi Pakkanen
43f0aa17b7
Add swift executable support in Xcode.
2021-05-23 17:59:14 +01:00
Jussi Pakkanen
e23fd086bf
Remove unnecessary hierarchical layer.
2021-05-23 13:28:25 +03:00
Jussi Pakkanen
b84265052e
Remove top level sources entry as unnecessary.
2021-05-23 13:28:25 +03:00
Jussi Pakkanen
7ceba6388c
Add meson.build files to pbxgroup.
2021-05-23 13:28:25 +03:00
Jussi Pakkanen
818685ec18
Write project info in a tree structure rather than the current flat one.
2021-05-23 13:28:25 +03:00
Jussi Pakkanen
53f6ef3b7b
Xcode: fix project cleaning.
2021-04-29 21:12:11 +01:00
Jussi Pakkanen
1a31882f59
Xcode: make Swift projects work.
2021-04-25 15:35:13 +03:00
Jussi Pakkanen
1cd80985b4
Xcode: add objective C++ flags to plain C++ because Xcode requires it.
2021-04-25 15:35:13 +03:00
Jussi Pakkanen
0e4c358f35
Xcode: add objective C flags to plain C because Xcode requires it.
2021-04-25 15:35:13 +03:00
Jussi Pakkanen
aa2a153afb
Xcode: fix linking to customtargetindex objects.
2021-04-24 19:41:27 +03:00
Jussi Pakkanen
22d0e6dd55
Xcode: even more command line argument expansion.
2021-04-23 23:03:26 +03:00
Jussi Pakkanen
0785ec3317
Xcode: Quote McQuoteface.
2021-04-23 23:03:26 +03:00
Jussi Pakkanen
ee2363dbb7
Xcode: handle CustomTargetIndexes.
2021-04-23 17:29:29 +03:00
Jussi Pakkanen
2a341dd4ec
Xcode: ever more quoting.
2021-04-23 17:29:29 +03:00
Jussi Pakkanen
7fba94997f
Xcode: only add source and build dirs if implicit_include_directories is set.
2021-04-23 17:29:29 +03:00
Jussi Pakkanen
bff85e2a6c
Xcode: do not link shared modules against executables.
2021-04-22 16:53:43 +03:00
Jussi Pakkanen
40fb466513
Xcode: add missing quote character.
2021-04-22 16:53:43 +03:00
Jussi Pakkanen
965f7e18fa
Xcode: fix shell quotings.
2021-04-22 16:53:43 +03:00
Jussi Pakkanen
4881c2cf98
Xcode: skip link language override test.
2021-04-22 16:53:43 +03:00
Jussi Pakkanen
674538d8c9
Xcode: put all include dirs via a property rather than a cmd line arg.
2021-04-21 17:16:01 +03:00
Jussi Pakkanen
b42a5e21d0
Xcode: add target private dir to include path.
2021-04-21 17:16:01 +03:00
Jussi Pakkanen
3f99830f74
Xcode: quote some entries as needed.
2021-04-21 17:16:01 +03:00
Jussi Pakkanen
d116d94f92
Xcode: fix file objects in various places.
2021-04-20 17:23:50 +03:00
Jussi Pakkanen
7803405128
Xcode: fix compiling shared modules.
2021-04-20 17:23:50 +03:00
Jussi Pakkanen
6f76fce904
Xcode: regenerato project file when build conf changes.
2021-04-19 17:59:40 +03:00
Jussi Pakkanen
8943945efe
Xcode: replace all backslashes with eight backslashes. Because obviously.
2021-04-19 17:59:40 +03:00
Jussi Pakkanen
68dda2a241
Xcode: fix generators that take custom targets as inputs.
2021-04-18 19:19:29 +03:00
Jussi Pakkanen
e422e9c634
Xcode: add proper target dependencies to custom targets.
2021-04-18 19:19:29 +03:00
Jussi Pakkanen
126db6de12
Xcode: fix running commands that lie in the build root dir.
2021-04-18 19:19:29 +03:00
Jussi Pakkanen
09d89dfaeb
Xcode: fix custom target chaining.
2021-04-18 19:19:29 +03:00
Jussi Pakkanen
fa947e6d75
Xcode: made custom targets into top level AggregateTargets.
2021-04-18 19:19:29 +03:00
Jussi Pakkanen
cc2a2e8492
Xcode: make the test target depend on build_all target.
2021-04-16 18:14:01 +03:00
Jussi Pakkanen
48e38fbaeb
Xcode: fix custom targets that produce objs and libs.
2021-04-16 18:14:01 +03:00
Jussi Pakkanen
aaae1b2a30
Xcode: handle capturing generators.
2021-04-16 18:14:01 +03:00
Jussi Pakkanen
39f963988b
Xcode: this is what happens when you do not treat command lines as arrays.
2021-04-15 17:21:45 +03:00