There's a BBC article which goes over several scenarios in case of no-deal Brexit containing the following paragraph:
It is possible that if EU authorities decide not to check UK goods at the Irish border, but do check them at Calais or Dunkirk, it would provoke a complaint to the WTO.
The WTO matter is not elaborated any further in that article. So what would be the legal basis for such complaint? Is it stated in the WTO treaties somewhere that goods must be checked (right) at the border if they are checked at all?